[meta] Better mouse support (e.g. handle middle button, don't treat right button as Back navigation)
Categories
(GeckoView :: General, task, P3)
Tracking
(Not tracked)
People
(Reporter: azazabc123, Unassigned)
References
(Depends on 5 open bugs, Blocks 1 open bug)
Details
(Keywords: meta)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0
Steps to reproduce:
Tested on Firefox 68.1.1 via Google Play, on:
- SAMSUNG Galaxy Tab S6 (SM-T860)
- ASUS ZenPad 3s 10 (P027)
- ASUS Zenfone 6 (I01WD)
Use an USB-OTG adapter or bluetooth to connect to a (I use Logitech) keyboard + mouse. I use them with my Android tablet. However, for the behavior of mouse, I found there are lots of differents with desktop version (at least, tested on Firefox for Linux, Windows and macOS) when you use "right-button" and "middle-button"
Actual results:
- mouse middle-click will immediately [A] close the whole Firefox immediately (Samsune Tab S6) or [B] open the main menu of Firefox (ASUS ZenPad 3s 10, Zenfone 6) just like you use finger to tap the three-dots of button on top-right; so I cannot:
(i) middle-click on tab to close tab
(ii) middle-click on link to open with new tab - mouse right-click is COMPLETELY an equivalence to Android's "back button", instead of context-menu.
=======
I just spent hours to write a simple WebExtension to experiment if this can be achieve via WebExtension, but I found WebExtension for Android cannot catch auxclick
, contextmenu
, instead, it can only catch click
, touchstart
, mousedown
via content.js
.
Is such mouse supporting can be added into Firefox upstream itself? I have no knowledge about Android development, but just curious assume that the effort to implement [1. mouse right click 2. mouse middle click], is not that heavy , maybe it can be pleased...? Very thanks!
Expected results:
I wish these three behaviors can be the same as Firefox for Desktop, because Firefox is a AAA productivity software, no matter on Desktop or on Android.
Comment 1•5 years ago
|
||
Moving this to geckoview triage - i am not sure if this is platform related.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Looking for many android bugs in https://issuetracker.google.com/. Samsung's devices [1] may assign back for right click.
But my Pixel 2 assigns to right button via bluetooth mouse correctly like desktop. So I would like to know mouse event data via http://w3c.github.io/uievents/tools/mouse-event-viewer.html on samsung's device.
Comment 3•5 years ago
|
||
azazabc123, is this bug reproducible in Firefox Preview (Fenix)? We've made some changes to how mouse events work in GeckoView for Fenix.
Chromebook trackpads also generate mouse events. Fennec converts mouse events to touch events. Randall changed GV to pass mouse events directly to Gecko (to fix some scroll wheel event issues on Android TV remote controls).
See related Chromebook trackpad bug 1561927.
Reporter | ||
Comment 4•5 years ago
|
||
I found some stackoverflow similar to this questions... And become to unsure if this is able to be solved by Firefox...:
https://stackoverflow.com/questions/22692959/right-mouse-button-in-android
https://stackoverflow.com/questions/10041295/android-usb-mouse-right-click-correct-behaviour-ics/29311126#29311126
Comment 5•5 years ago
|
||
The second stackoverflow link you shared suggests the kernel is translating the mouse event into a back event. In that case, I don't know how Firefox can work around this problem.
azazabc123, does Chrome work correctly? If so, then apparently Chrome knows how to handle or work around this mouse issue...
Comment 6•4 years ago
|
||
Mouse on Android should behave the same as mouse on desktop (rather than assign Android-specific functionality to right-mouse button, it should trigger context menu/fire contextmenu event/etc).
Since Android 11, Samsung devices have correctly passed right and middle mouse clicks to applications. Samsung now matches the behavior of Pixel devices, Motorola devices, various Desktop Modes like DeX, and others. Even the Nvidia Shield TV supports PC like mousing. Many OEMs have modified the back and middle mouse button behavior in the past but this is becoming less common.
Thanks to this, website content can now make use of right and middle clicks on many Android devices including Samsung tablets. However the Firefox interface does not support right or middle clicks whatsoever. There is no right click > open in new tab, for example, or middle click to immediately open a link in a background tab. It is also impossible at the moment to zoom with mouse and keyboard, for example with ctrl + scroll wheel.
For what it is worth, Chromium browsers on Android support almost the full PC set of keyboard and mouse shortcuts and actions and have done so for probably 5 years or so? Improving mousing (and keyboard) on Firefox would close a long standing feature gap.
Just got my Samsung Tab S8 Ultra and I paired my Thinkpad Trackpoint II Bluetooth keyboard to it. Firefox is pretty much unusable with the mouse as I have to long press touching the screen in order to open up links in tabs and such. Chrome works exactly as one would expect, middle click opens tabs, right click brings up the context window, etc. The behavior is the same with the Samsung Keyboard Cover.
Please get this addressed as I use Firefox exclusively on my computers, Linux, Windows, Android phones and tablets. Thank you.
I saw that it might be possibly implied that the Samsung Keyboard Cover works fine, but it behaves the same was Trackpoint keyboard. Mouse works as it is supposed to in Chrome, but not in Firefox.
Comment 10•2 years ago
|
||
Mouse works as it is supposed to in Chrome, but not in Firefox.
Does it means both?
- Middle button opens new tab
- Right click opens context menu
Updated•2 years ago
|
Comment 11•2 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #10)
Mouse works as it is supposed to in Chrome, but not in Firefox.
Does it means both?
- Middle button opens new tab
- Right click opens context menu
Yes. Chrome does that.
Comment 12•2 years ago
|
||
(In reply to locuturus from comment #11)
Yes. Chrome does that.
Thanks. I guess that middle button issue should be handled by Fenix/android-component.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•1 year ago
|
Description
•