[openstreetmap/openstreetmap-website] Adapt richtext javascript to Turbo (PR #5116)

Anton Khorev notifications at github.com
Sat Aug 24 15:06:00 UTC 2024


See the discussion at #5111 and [this Turbo Handbook section](https://turbo.hotwired.dev/handbook/building#installing-javascript-behavior).

Things that are installed once in `$(document).ready()`:
- delegated Bootstrap tab events
- window resize listener

Things that are installed in `$(document).on("turbo:load")`:
- textarea listeners because can't delegate `invalid` events
- help updater that moves the help card between a tab pane and a sidebar is called once
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Adapt richtext javascript to Turbo

-- File Changes --

    M app/assets/javascripts/richtext.js (93)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/5116 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240824/5e0746b4/attachment.htm>


More information about the rails-dev mailing list