[openstreetmap/openstreetmap-website] Fix outputting route before directions sidebar is loaded (PR #5961)
Anton Khorev
notifications at github.com
Mon Apr 28 01:42:15 UTC 2025
Fixes #5959.
To reproduce the bug:
1. add `sleep 5` or something similar into directions search action https://github.com/openstreetmap/openstreetmap-website/blob/d54310c0dbf0c69ddbaeabfc93e415129dad6f66/app/controllers/directions_controller.rb#L7-L9
2. do steps from #5959
The fix here delays the route request to be performed after the sidebar finishes loading.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5961
-- Commit Summary --
* Schedule route request to be executed later if sidebar is not loaded
* Enable endpoint listeners before sidebar finishes loading
-- File Changes --
M app/assets/javascripts/index/directions.js (32)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5961.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5961.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5961
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5961 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250427/05282a65/attachment.htm>
More information about the rails-dev
mailing list