[openstreetmap/openstreetmap-website] Fix "Zoom in" tooltips on Edit button and Data/Notes layer checkboxes when they have to appear after not being shown initially (PR #3688)
Anton Khorev
notifications at github.com
Tue Sep 13 04:31:48 UTC 2022
Continuation of #3634 which I didn't have time to finish in August...
[As I said](https://github.com/openstreetmap/openstreetmap-website/pull/3634#issuecomment-1199687741) there's a different bug when tooltips are enabled/disabled and it needs a different fix. You can trigger the bug like this:
1. reload the website when the map is zoomed in enough for the control element (for example, the Edit button above the map) to be enabled and tooltip to be disabled
2. hover the mouse over the control element - nothing should happen at this moment
3. zoom out until the element is disabled
4. hover the mouse over the control element again - now you should get the error from this Bootstrap issue: https://github.com/twbs/bootstrap/issues/35375
The fix is to use [.disable()](https://getbootstrap.com/docs/5.1/components/tooltips/#disable) method on tooltip objects instead of trying to set the `data-bs-original-title` to empty string. `data-bs-original-title` is undocumented anyway.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/3688
-- Commit Summary --
* Fix zoom level related tooltips except for layer checkboxes
* Merge tooltip fixes/tests
* Fix zoom level related tooltips for layer checkboxes
* Fix zoom level related tooltip for Edit button
* Add bootstrap to js globals
-- File Changes --
M app/assets/javascripts/application.js (15)
M app/assets/javascripts/leaflet.layers.js (19)
M config/eslint.json (1)
M test/system/site_test.rb (50)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/3688.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3688.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3688
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3688 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220912/7b9c4a27/attachment.htm>
More information about the rails-dev
mailing list