Fix Firefox ctrl-click drag rotation#7456
Open
officialasishkumar wants to merge 2 commits intomaplibre:mainfrom
Open
Fix Firefox ctrl-click drag rotation#7456officialasishkumar wants to merge 2 commits intomaplibre:mainfrom
officialasishkumar wants to merge 2 commits intomaplibre:mainfrom
Conversation
Treat Firefox's ctrl-click mouse events as rotate gestures when roll is disabled, while preserving ctrl-right roll behavior for maps that enable camera roll. Add unit and map-level regression coverage for the gesture classification.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7456 +/- ##
==========================================
- Coverage 92.77% 92.50% -0.28%
==========================================
Files 289 289
Lines 24017 24017
Branches 5100 5100
==========================================
- Hits 22282 22217 -65
- Misses 1735 1800 +65 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
Did you read the full issue thread and the closed PR? |
Author
|
Yes, I read the full issue thread and the closed PR. AI was used only for research and code auto completion |
Collaborator
|
I don't see how the fix is what's needed to solve this issue, can you please explain the solution (without the use of AI)? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6565
This updates mouse rotate gesture detection so Firefox/macOS Ctrl-click events, which arrive as right-button events with
ctrlKey, can start drag rotation when camera roll is not enabled. WhenrollEnabledis enabled, Ctrl-right-click remains reserved for roll gestures.Added coverage at both levels:
Validation run locally:
npm run test-unit -- src/ui/handler/mouse_handler_interface.test.ts src/ui/handler/drag_rotate.test.tsnpm run lint -- src/ui/handler/mouse.ts src/ui/handler/mouse_handler_interface.test.ts src/ui/handler/drag_rotate.test.tsnpm run typechecknpx cspell CHANGELOG.mdLaunch Checklist
CHANGELOG.mdunder the## mainsection.