Skip to content

Restore dblclick zoom on add-way behavior#11926

Open
aditya1010-max wants to merge 1 commit intoopenstreetmap:developfrom
aditya1010-max:fix-zoom-dblclick
Open

Restore dblclick zoom on add-way behavior#11926
aditya1010-max wants to merge 1 commit intoopenstreetmap:developfrom
aditya1010-max:fix-zoom-dblclick

Conversation

@aditya1010-max
Copy link

@aditya1010-max aditya1010-max commented Feb 26, 2026

Description

This PR addresses the issue described in #11373
behaviorAddWay disables double-click zoom when the behavior is installed, but restores it only through a delayed timer in the cancel path. If the mode exits before the timer fires (for example when cancelling quickly or switching modes), the cleanup may not run and double-click zoom can remain disabled.

Fix

Restore double-click zoom synchronously in behavior.off() so that the cleanup runs whenever the behavior is removed.
This ensures double-click zoom is consistently restored on all exit paths, including:

  • finishing a way
  • cancelling the operation
  • switching modes

Result

Double-click zoom is reliably restored after leaving Add Way mode.

This was verified by finishing a way, cancelling the operation, and switching modes to ensure zoom behavior is restored consistently (see clip below).

Fixes

Fixes #11373

Clips

Before

before.mp4

After

after3.mp4

@aditya1010-max
Copy link
Author

@tyrasd I’ve updated the PR description with more details and added short clips demonstrating the issue and the fix.

Would appreciate it if you could take a look whenever you have time.

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.

Restore the state of the possible double-click zoom-in function after the object addition has been canceled.

1 participant