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 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•6 months 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•6 months ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=49f7ec02a11fa5e83aa8d8ab20592520590a5b0b&tochange=81712ea026098ff0a4d5739d4deae97fcb21f296
Comment 4•6 months 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•6 months ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Comment 6•6 months 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•6 months 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•6 months ago
|
||
Ah, interesting. Yeah, we have a special feature for Shift
+ click. So, the Shift
should be "consumed" if the feature is enabled.
Updated•6 months ago
|
Assignee | ||
Comment 9•6 months 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•6 months ago
|
Comment 10•6 months ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/043841d38933 Make `Shift` + right click should work as a right click without `Shift` if contextmenu should forcibly be open r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/44535 for changes under testing/web-platform/tests
Comment 12•6 months ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Updated•6 months ago
|
Updated•5 months ago
|
Comment 14•5 months 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
•