[openstreetmap/openstreetmap-website] Disable turbo on all links inside pagination frames except older/newer (PR #5111)

Anton Khorev notifications at github.com
Fri Aug 23 12:08:29 UTC 2024


Something had to break after #4646.

Turbo handles all links inside its frames unless told not to. If any link leads to a page that has some javascript running on load, it's going to be broken. The most common javascript in our case is rich rext controls code. If you go to a diaries page and click "comment", turbo takes you to a diary entry page with broken richtext javascript.

I did here the same as in #4565: set `data-turbo="false"` on the entire frame and set it to true just on previous/next page links.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5111

-- Commit Summary --

  * Disable turbo on all links inside pagination frames except older/newer

-- File Changes --

    M app/views/diary_comments/_page.html.erb (2)
    M app/views/diary_entries/_page.html.erb (2)
    M app/views/shared/_pagination.html.erb (4)
    M app/views/traces/_page.html.erb (2)
    M app/views/user_blocks/_blocks.html.erb (2)
    M app/views/users/_page.html.erb (2)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5111.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5111.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5111
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5111 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240823/59f25094/attachment.htm>


More information about the rails-dev mailing list