Shift right clicking a webpage causes text selection
Categories
(Core :: DOM: Selection, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox122 | --- | wontfix |
| firefox123 | --- | wontfix |
| firefox124 | --- | verified |
| firefox125 | --- | verified |
People
(Reporter: BalaM314, Assigned: masayuki)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(1 external file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0
Steps to reproduce:
- Go to any web page
- Left click somewhere in the text
- Shift right click another part of the text
Actual results:
- The context menu is opened, AND the text between the first and second clicks is selected
Expected results:
- The context menu should have opened without selecting the text
Comment 2•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Selection' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•2 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=49f7ec02a11fa5e83aa8d8ab20592520590a5b0b&tochange=81712ea026098ff0a4d5739d4deae97fcb21f296
Comment 4•2 years ago
|
||
:masayuki, since you are the author of the regressor, bug 1845241, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 5•2 years ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Comment 6•2 years ago
|
||
I did some quick test, it seems Chromium and Safari have the same behavior. Maybe it is expected behavior after bug 1845241?
| Reporter | ||
Comment 7•2 years ago
|
||
Some websites block or override the right click context menu action. In Chrome, it is possible to completely disable the right click menu. Firefox makes shift+right click open the menu no matter what, which is very useful. I usually use shift+right click when I want to open the context menu.
| Assignee | ||
Comment 8•2 years ago
|
||
Ah, interesting. Yeah, we have a special feature for Shift + click. So, the Shift should be "consumed" if the feature is enabled.
Updated•2 years ago
|
| Assignee | ||
Comment 9•2 years ago
|
||
We have a pref, dom.event.contextmenu.shift_suppresses_event, which is
default to make Shift + right click forcibly open the context menu without
dispatching contextmenu event to the web.
When user wants to use this feature, they may (or must) assume that it works
as a right click (without Shift) except whether it overrides contextmenu
event listener of the web app. Therefore, Selection should be collapsed
at the click point instead of expanding to the click point.
Unfortunately, we need to consider it at mousedown, not mouseup nor
contextmenu. Therefore, Shift state may mismatch with the actual state at
mouseup and mousedown/poinerdown listeners of web apps may assume it will
expand selection, but I think that we cannot solve these issues.
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Comment 12•2 years ago
|
||
| bugherder | ||
Updated•2 years ago
|
Updated•2 years ago
|
Reproducible on a 2024-02-10 Nightly build on macOS 12.
Verified as fixed on Firefox 124.0b4 and Firefox Nightly 125.0a1 on macOS 12, Windows 10, Ubuntu 22.
Description
•