Open Bug 1587995 Opened 5 years ago Updated 3 months ago

[meta] Better mouse support (e.g. handle middle button, don't treat right button as Back navigation)

Categories

(GeckoView :: General, task, P3)

68 Branch

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:

  1. 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
  2. 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.

Moving this to geckoview triage - i am not sure if this is platform related.

Product: Firefox for Android → GeckoView
Version: Firefox 68 → 68 Branch

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.

[1] https://issuetracker.google.com/issues/36977483

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.

See Also: → 1561927

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...

Priority: -- → P3
Summary: [Android] Better mouse support (e.g. middle button, right button) → [Android] Better mouse support (e.g. handle middle button, don't treat right button as Back navigation)

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).

Depends on: 1700365

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.

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
Type: enhancement → task
Depends on: 1693237
Keywords: meta
Summary: [Android] Better mouse support (e.g. handle middle button, don't treat right button as Back navigation) → [meta] Better mouse support (e.g. handle middle button, don't treat right button as Back navigation)
Depends on: 1757352

(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.

(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.

Severity: normal → S3
Depends on: 1805341
Depends on: 1806782
Severity: S3 → N/A
Status: UNCONFIRMED → NEW
Ever confirmed: true
Depends on: 1586471
Depends on: 1847316
Depends on: 1878819
Depends on: 1879701
Depends on: 1886300
Depends on: 1837119
You need to log in before you can comment on or make changes to this bug.