Clicking on select tag sometimes it closes automatically selecting the option under the pointer
Categories
(Core :: Widget: Cocoa, defect, P2)
Tracking
()
People
(Reporter: orlando, Assigned: spohl)
References
Details
Attachments
(2 files)
| Assignee | ||
Comment 1•8 years ago
|
||
Comment 3•6 years ago
|
||
This is trivially reproducible in Firefox, Chrome, and Safari, almost 100% of the time: move the mouse while clicking on the select. If you move the mouse far enough, you select a different option.
If you're using a sensitive mouse, it's easy to do this unintentionally. It's harder to do unintentionally if using a trackpad. And if you're using a trackball, you probably will never do it unintentionally, but it's easy to do intentionally.
My question then, since this seems to be common across browsers: is this in fact the "expected" behaviour? And if so, how to disable it?
Comment 4•6 years ago
|
||
I think one reason this happens sometimes is that we call maybeRollup here
This happens when you do two finger scrolling on the touchpad. In my testing neither Chrome nor Safari rollup the drop down in this situation. They ignore the scroll instead.
There is a similar situation for pinch gestures, Chrome and Safari ignore them when a dropdown is open. In
https://hg.mozilla.org/mozilla-central/rev/2d1ff1c60749f49ecf0a14c97f24f0b69dcdd48f
I made us rollup in this situation for consistency and because it seemed easier to do.
Do you think we should change this behaviour to be more like Chrome and Safari?
Comment 5•6 years ago
|
||
(In case you're asking me ...) Perhaps you're right about maybeRollup being invoked in this situation, but would that be from line 3471? This issue is about about accidentally (or deliberately) nudging the mouse pointer when you click on a select, and this problem occurs when using a mouse or a trackball without in any way "scrolling". I'd be surprised if the function scrollWheel:(NSEvent*)theEvent were being called in this case. (But I'm open to surprises.)
OK, the behaviour seems to be the same as you observe if you slow it right down. E.g., go to the w3schools example mentioned in comment 2. Position the mouse cursor over the middle of the select, mouse down (which opens the select), then move the mouse slightly left or right, then mouse up. The select closes again, even though you've only done a total of one mouse click. Or, click-and-hold, then while holding down the mouse button, move the mouse over a different option, then release the button; the select closes. So this is what seems to happen, but much faster, if you click and just happen to "nudge" the mouse as you click. If so, then the "problem" could be "addressed" by reducing the "sensitivity" of the detection of cursor motion.
If by "more like Chrome and Safari" that means:
- the slowed-down behaviour is regarded as "correct", or, at least, isn't going to change any time soon,
- noting that the slowed-down behaviour in Firefox is already the same as in Chrome and Safari
- in the case of the "click and nudge" behaviour, the behaviour can also be triggered in Chrome and Safari, but the "sensitivity" of the nudging is less in Chrome and Safari,
then yes, make Firefox less "sensitive" to nudging the mouse pointer while clicking on a select.
| Assignee | ||
Comment 6•6 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #4)
I think one reason this happens sometimes is that we call maybeRollup here
This happens when you do two finger scrolling on the touchpad. In my testing neither Chrome nor Safari rollup the drop down in this situation. They ignore the scroll instead.
There is a similar situation for pinch gestures, Chrome and Safari ignore them when a dropdown is open. In
https://hg.mozilla.org/mozilla-central/rev/2d1ff1c60749f49ecf0a14c97f24f0b69dcdd48f
I made us rollup in this situation for consistency and because it seemed easier to do.
Do you think we should change this behaviour to be more like Chrome and Safari?
Sorry for the delay here. Yes, I believe it would be preferable to mirror Chrome and Safari in this instance. Thank you for pointing this out!
Comment 7•6 years ago
|
||
Hey, guys!
I'm with the same problem on Firefox 80.0.1 at Mac OS Catalina 10.15.6.
What is being done about this issue?
Here's a demo page that is 100% reproducible for me: https://cam-narzt.github.io/select-problem/
firefox 84.0b4 (64-bit) on macOS 10.15.7 (19H15)
Comment 9•5 years ago
|
||
Has anybody encountered this issue with the touchpad, or is this mostly affecting mouse users?
It seems like the native menu used in Chrome and Safari has a higher mouse move tolerance before it interprets a wiggly click as an open-drag-select gesture.
Our code to prevent instant-close on regular (non-wiggly) clicks is here:
https://searchfox.org/mozilla-central/rev/168c45a7acc44e9904cfd4eebcb9eb080e05699c/layout/xul/nsMenuFrame.cpp#340-349
It seems like we could tweak that code to take the movement distance into account.
Comment 10•5 years ago
|
||
It used to happen frequently to me on a touchpad, I haven't noticed it as much since I upgraded macs.
Comment 11•5 years ago
|
||
TODO: Store the mousedown event's information in gMenuOpeningMouseDownData
Comment 12•5 years ago
|
||
In my example, I cannot get the dropdown to stay open with a trackpad, not even with a perfectly stationary cursor.
Comment 13•5 years ago
|
||
Oh, weird! I can't reproduce that at all. With the trackpad it always stays open for me. Do you press down on the trackpad or do you use "Tap to click" (can be enabled in the Trackpad preferences)?
Comment 14•5 years ago
|
||
(In reply to Cam from comment #8)
Here's a demo page that is 100% reproducible for me: https://cam-narzt.github.io/select-problem/
I can reproduce with this 100% of the time. I don't have tap to click enabled.
Comment 15•5 years ago
|
||
I do not have tap to click enabled.
Comment 16•5 years ago
|
||
Because I was curious, I enabled tap-to-click and tried my demo, but got the same results. The dropdown just immediately closes, you can barely even see it flash.
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Comment 17•5 years ago
|
||
Same issue.
MacOS: Big Sur 11.1
Firefox: Developer 85.0b4
Device: Apple Magic Mouse
Comment 18•5 years ago
|
||
Spent the past hour looking for resolution to this issue and stumbled upon this PR. 100% reproducible here on macOS.
I hit this issue constantly, trying to get a menu pull-down and am already moving to select some item from the list. Triple-flash, menu closes, face grimaces.
Comment 19•4 years ago
|
||
Same issue.
Device: Apple Magic Mouse
Comment 20•4 years ago
|
||
Also repro for me on Mac
FF 92.0.1
Mac OS Big Sur v 11.6
It seems to be that on FF, the browser allows you to scroll the page when a dropdown is open, and it automatically closes the dropdown. On Chrome, they appear to have disabled scrolling the page when a dropdown is open. So I guess that is why it doesn't happen on Chrome.
Thanks,
Ali
Comment 21•4 years ago
|
||
Fixed for me in FF100.b4
| Assignee | ||
Comment 22•4 years ago
|
||
(In reply to Cam from comment #21)
Fixed for me in FF100.b4
Would you be able to run mozregression to see when this was fixed? Let me know if you need any instructions on how to run it.
Comment 23•4 years ago
|
||
It seems to be that on FF, the browser allows you to scroll the page when a dropdown is open, and it automatically closes the dropdown. On Chrome, they appear to have disabled scrolling the page when a dropdown is open. So I guess that is why it doesn't happen on Chrome.
This issue is independent of the noted "close on scroll" effect. It occurs with selects that are not within scrollable content.
Fixed for me in FF100.b4
I can still reproduce easily in 100.0b5. It's slightly more difficult to reproduce here -- https://cam-narzt.github.io/select-problem/ -- because the area of selectable options is relatively small and "Roles" is not selectable. Moving the cursor slightly sideways while clicking on an already selected option (e.g. "admin") is an easy way for me to reproduce. A larger select dropdown, with no non-selectable items makes it easier to reproduce.
It's possible to reproduce this exact same issue in Chromium and Safari, both are just significantly less "sensitive" - the cursor needs to move much farther quickly. It seems both browsers have a larger threshold of movement required
Comment 24•4 years ago
|
||
I have this exact same issue. Can be reproduced using my MX Master mouse or M1 Macbook Pro touchpad 100% of the time.
It occurs when the mouse is still in motion after clicking the select field - even if ever so slightly.
Only solution I've had is to long-click on select fields.
We need this to get fixed! Doesn't occur on Chrome at all.
Comment 25•3 years ago
|
||
This is the ONE reason I cannot use FireFox and I'm stuck with Chrome. This has happened with various mice, mostly expensive mice... but I don't have any cheap mice to test. It happens on the basic of basic form selects.
In my opinion, when you click on a select, and the options present, unless you click on an option, or click outside the options, or hit enter, that list should stay open just waiting for some interaction.
In my trials with FireFox, I'll click on the select to open and immediately move my mouse to the proper selection, and during this movement, something will just select automatically, without even a mouse click. I used FireFox way back, and never had issues like this. I'm on an M1 Mac.
Comment 27•3 years ago
|
||
Not fixed for me... just tried it, still random selections.
| Assignee | ||
Comment 28•3 years ago
|
||
Updated•3 years ago
|
Comment 29•3 years ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:spohl, since the bug has high priority, high severity and recent activity, could you please find another way to get the information or close the bug as INCOMPLETE if it is not actionable?
For more information, please visit auto_nag documentation.
| Assignee | ||
Comment 30•3 years ago
|
||
I need to work through some test failures and will post an updated patch at that time.
Comment 31•3 years ago
|
||
Comment 32•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 33•3 years ago
|
||
This bug was reproduced with Magic Mouse in Nightly v84.0a1 and verified in BEta v110.0b5 and Nightly v111.0a1 in MacOS 11.6.8.
Description
•