Skip to content

Fix bug where Rapid does not correctly zoom to task#2714

Merged
CollinBeczak merged 2 commits into
mainfrom
jlow/fix-rapid-initial-zoom
Aug 29, 2025
Merged

Fix bug where Rapid does not correctly zoom to task#2714
CollinBeczak merged 2 commits into
mainfrom
jlow/fix-rapid-initial-zoom

Conversation

@jake-low

Copy link
Copy Markdown
Contributor

Fixes #2639 by setting the Rapid editor's window.location.hash once the editor finishes loading (i.e. once the setupRapid() promise resolves). Previously we set the hash only via the iframe's src attribute. I'm not sure why setting it a second time fixes the issue, but I observed that clicking the "Reselect Task" button did correctly zoom the editor, and did so by updating the iframe's window.location.hash, so I figured also doing this after the editor finishes loading wouldn't hurt.

@CollinBeczak

Copy link
Copy Markdown
Collaborator

LGTM!

@CollinBeczak CollinBeczak merged commit 18dae53 into main Aug 29, 2025
6 checks passed
@CollinBeczak CollinBeczak deleted the jlow/fix-rapid-initial-zoom branch August 29, 2025 13:16
@CollinBeczak CollinBeczak mentioned this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rapid editor does not zoom to appropriate area if task is not linked to an OSM feature

2 participants