see https://github.com/openstreetmap/iD/issues/10700#issuecomment-4615707609 for a slightly deeper analysis.
tldr; normally, the `onIframeHashChange` event is immediately followed by the respective `hashchange` event. But in some conditions (when the js main thread is busy with something else), it can happen that multiple `onIframeHashChange` events/messages are received right after each other, before the respective `hashchange` events are called. The mechanism that detects whether a hash change was "automatic" (set programmatically from inside the iframe by iD) relies on the order of events to always be consistent. This makes the implementation more robust by remembering which concrete hashchanges were triggered by the incoming iframe messages, avoiding duplicate/nop changes, and only updating the editor's map location if the hash change really did not come from the iD iframe itself. fixes https://github.com/openstreetmap/iD/issues/10700 You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/7134 -- Commit Summary -- * fix detection of automatic hash changes for out-of-order events -- File Changes -- M app/assets/javascripts/edit/id.js.erb (10) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/7134.patch https://github.com/openstreetmap/openstreetmap-website/pull/7134.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/7134 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/openstreetmap-website/pull/[email protected]>
_______________________________________________ rails-dev mailing list [email protected] https://lists.openstreetmap.org/listinfo/rails-dev
