Open Bug 1413874 Opened 7 years ago Updated 4 months ago

Add mouse gestures natively

Categories

(Firefox :: General, enhancement)

57 Branch
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: martijn, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171024165158

Steps to reproduce:

Previously mouse gestures addons worked almost completely fine. Now with WebExtensions, they cannot ever work anywhere other than in a fully loaded webpage.


Actual results:

So mouse gestures are basically non-functioning, and cannot ever make it back unless one of two things happen:
1) Bring back XPCOM support for addons
2) Integrate mouse gestures into Firefox natively


Expected results:

I'd like to see mouse gestures natively.

Opera used to have native mouse gestures, and they worked *everywhere*. And I do mean absolutely everywhere. In modal dialog boxes, in alert() boxes, in preferences, in every kind of tab, ab-so-lu-tely everywhere.

Popular XPCOM-based gestures addons didn't work absolutely everywhere, but at least in enough places for them to make some sense. They worked in empty tabs, preferences, addons.mozilla.org, extension tabs, etc.

Now with WebExtensions, mouse gestures can ONLY work in a fully loaded webpage. This is a highly restrictive situation for something that oughta work just simply everywhere. So they DON'T work in a webpage that's not fully loaded, they don't work in an empty tab, they don't work in preferences, they certainly cannot start from the tab itself, and the rocker buttons cannot ever be made to work anywhere at all.

So without XPCOM, the only way to have mouse gestures proper, is for them to exist natively in the browser.
Component: Untriaged → General
I don't agree with this, which could lead to a semi-finished product and break the add-ons ecosystem, like Pocket, and it's basically a feature for advanced users. Providing adequate APIs and platforms is a better, more comprehensive and rich customizable experience.

I think it is possible to provide a full support without XPCOM, but this may not be the focus of Mozilla. Some thoughts, WebExtensions APIs might can allow extensions to run a cover layer instead of requiring the extensions to inserte scripts into pages, to allow the interception of some clicks and actions, and bring  sandboxing. But this certainly requires more thought, like anti-hijacking, performance and more.

There may be a better place to talk about this:
https://mail.mozilla.org/listinfo/dev-addons
https://groups.google.com/forum/#!forum/mozilla.addons.user-experience
https://discourse.mozilla.org/c/add-ons/development


See also: bug 459763, bug 158247, bug 76537.
Severity: normal → enhancement
I disagree with YF, this should be one of the core features of the browser. Navigating by mouse gestures is as much an accessibility feature as navigating by keyboard. 
Furthermore, Firefox on Android still comes without basic touch gestures, which is a severe oversight in my opinion. 

Yes to mouse gesture navigation on desktop and touch gesture navigation on touchscreens.
The 3 referenced bugs by YT are 17, 16 and 9 years old, the last one from around the time when touchscreen phones started their journey towards dominance.
> Some thoughts, WebExtensions APIs might can allow extensions to run a cover layer instead of requiring the extensions to inserte scripts into pages, to allow the interception of some clicks and actions, and bring  sandboxing. But this certainly requires more thought, like anti-hijacking, performance and more.

This is a hacky workaround to make WebExtensions do what it should be able to do natively. XPCOM was a *brilliant* framework to allow all kinds of system-wide hooks, like mouse gestures, and WebExtensions did nothing but make very many things, like mouse gestures, near-impossible.

The only true way to get GOOD mouse gesture functionality in Firefox, is to add either XPCOM or mouse gestures into the core browser.

I also strongly agree with heraldo.

I'd like to add, that mouse gestures aren't in the way of anyone who doesn't use them. Like dozen of other features, if mouse gestures natively don't make sense, why do we have Pocket, Web Developer, Bookmarks? These are not core browsing, and could be done with addons. But with WebExtensions they probably can't exist, which is why they and mouse gestures should be native features.
For those who use mouse gestures regularly, this functionality being broken in Firefox 57+ basically makes the browser close to unusable for them.

I don't think implementing this natively is the way to go, though. I think fixing the extension architecture so that people can actually make powerful extensions again is the much better solution.

Let's be honest, the core strength of Firefox has always been in its capability to be improved through extensions into an awesome browser.  Opening up the power to create features like this to the community through extensions means that there is a much larger pool of people able to add features, without them having to learn the entire browser source code.

If an extension for mouse gestures is missing a feature that you want, you can easily write your own extension.
If a built-in mouse gesture system is missing a feature that you want, it's a much, much harder prospect to add that feature.
> I don't think implementing this natively is the way to go, though. I think fixing the extension architecture so that people can actually make powerful extensions again is the much better solution.

Powerful extensions are no longer possible. XPCOM has been ditched.

> Let's be honest, the core strength of Firefox has always been in its capability to be improved through extensions into an awesome browser.  Opening up the power to create features like this to the community through extensions means that there is a much larger pool of people able to add features, without them having to learn the entire browser source code.

The problem is, we're stuck with WebExtensions, which is objectively broken (or incomplete at best) by design, as proven by the breakage of MANY of the actually useful extensions. The featureset of WebExtensions is so limited that even something as seemingly simple as mouse gestures has become almost impossible, except on fully loaded http(s) webpages that aren't on addons.mozilla.org, for magical reasons.

> If an extension for mouse gestures is missing a feature that you want, you can easily write your own extension.

Not anymore we can't. WebExtensions makes it plain *impossible*, let alone easy.

> If a built-in mouse gesture system is missing a feature that you want, it's a much, much harder prospect to add that feature.

Which is what I'm asking here, because of the reasons I mentioned a couple of times.
(In reply to Nameless Voice from comment #4)
 
> Let's be honest, the core strength of Firefox has always been in its
> capability to be improved through extensions into an awesome browser. 

I used to be a core strength, not anymore, I don't think it is even a core goal at the moment.

Gesture based browsing makes sense with a mouse and with a touchscreen, it can also be considered an accessibility features, so the sooner this becomes part of the basic Firefox feature set, the better, in my opinion.

> If an extension for mouse gestures is missing a feature that you want, you
> can easily write your own extension.
> If a built-in mouse gesture system is missing a feature that you want, it's
> a much, much harder prospect to add that feature.

That is an assumption, not a fact.
(In reply to heraldo from comment #6)
> (In reply to Nameless Voice from comment #4)
>  
> > Let's be honest, the core strength of Firefox has always been in its
> > capability to be improved through extensions into an awesome browser. 
> 
> I[t] used to be a core strength, not anymore, I don't think it is even a core
> goal at the moment.

The way I see it, Mozilla have a choice.  They can work hard to bring back the power of their extensions, or they can lose most of their former core user base to the various forks.


What are the advantages of having built-in support for mouse gestures over enabling extensions to implement them through an expanded framework?  The latter also allows other extensions to use the same functionality for different purposes, plus the developers who would otherwise work on the native system could make an official extension on top of the framework.
I presume Mozilla won't be adding a very power extensions framework anytime soon. I mean, they ditched XPCOM, which is exactly wha that is: a very powerful and complete, fully and brilliantly functioning extensions framework that everyone was using.

They won't add back anything like that. They hated it (and its users, I feel) and wanted a less-extensible browser. They succeeded with the rise of WebExtensions.

And this is (again) why native mouse gestures is the way to go.

Also, bear in mind, Opera had this feature about 15 years ago already. That's fifteen years ago! Opera used to be the poweruser browser, for this and many other reasons. For that reason I don't see why it merits so much discussion, on whether or not to implement mouse gestures.

The greatest advantage of having built-in mouse gestures support is, just like in Opera, that they work *absolutely everywhere*. In Opera, it was even possible to dismiss an alert() window using the "close window" gesture. That wasn't even possible with FireGestures, and I'm not 100% sure something "low level" like that would ever work through an XPCOM extension.
"For those who use mouse gestures regularly, this functionality being broken in Firefox 57+ basically makes the browser close to unusable for them."

I can vouch for this. Ended up switching to Vivaldi solve this problem.
I raised another enhancement to add support for extensions to implement custom user input methods such as mouse gestures.  The number is 1428485.


I think that would be the better path to take, since it would potentially allow any other custom input method too, but honestly I don't care which method is chosen so long as we get something that actually works.
Depends on: 1428485
Support for allowing extensions to add input methods (such as mouse gestures) has been rejected, so native support is the only alternative now.
(In reply to Nameless Voice from comment #11)
> Support for allowing extensions to add input methods (such as mouse
> gestures) has been rejected, so native support is the only alternative now.

seriously, these guys...
without mouse gestures the only thing a browser can do is displaying manga on tablet and there is no point in denying
So uhm. Can we get on with it please?
(In reply to Martijn from comment #13)
> So uhm. Can we get on with it please?

I'm currently digging into ff code to investigate and estimate what would it take to add native gestures support. Honestly I doubt that someone not part of Mozilla team is capable of doing that, but anyway. I'm currently looking into two approaches:
1. find some place to integrate a filter for window system's events. This way we can handle gestures on any and every window, the most generic approach;
2. understand the XPCOM interface (which is still there, the whole Mozilla framework is based on it) and add gesture handling that way (or even port some existing plugin). This could be easier, but I'm not sure if it's possible.

Any guidance from people understanding Mozilla platform architecture is greatly appreciated.
Will users be able to disable mouse gestures? Otherwise some of us might have trouble avoiding accidental mouse gestures. Maybe not as much trouble as avoiding tapping and touch gestures.

Will users be able to access all core Firefox features without gestures?
> Will users be able to disable mouse gestures? Otherwise some of us might have trouble avoiding accidental mouse gestures. Maybe not as much trouble as avoiding tapping and touch gestures.

Opera, long ago, had solved that quite elegantly. When a user performs a mouse gesture for the very first time, it'd display a popup asking the user whether to enable gestures or not, after explaining what they are.

This way, an accidental mouse gesture is caught, and brought to the user's attention once. After that, the user is hopefully aware that they exist, and might be pleasantly surprized. If the user doesn't like them, he would've opted not to enable them.

As with all features, there must of course be an easy way to enable or disable them. But since mouse gestures are "invisible", it might be a good idea to provide visual feedback when a gesture has been performed. Visual feedback can then be disabled, in time or by a power user, in the options panel.

> Will users be able to access all core Firefox features without gestures?

Nothing should change about the way Firefox users currently access any feature. Mouse gestures should be an enhancement, NOT a replacement of any existing UI.

So unless the addons framework is fixed by now, I do wonder, is this being worked on?

(In reply to Martijn from comment #17)

So unless the addons framework is fixed by now, I do wonder, is this being worked on?

I'm not working on this

Firefox seems to really like adding unique features, like Pocket and Sync. That's cool. But not that unique. Why not add a truly unique (unique among the 4 big ones) feature like, oh I dunoo, mouse gestures?

Have a look at Opera 12 on how it should be implemented.

It's baffling how Firefox doesn't come with at least 3 basic gestures out of the box:

  • Drag to left to go backwards
  • Drag to right to go forward
  • Drag down to open new tab

I'd avoid adding "Close tab gesture" (usually drag up) coz having tabs closed when you don't want them is super annoying and just not having a gesture for it is a better choice.

Opera had this for years and it became such natural part of my browsing that I was trying to use it at work on stupid IE. And no, saying "but use muh extensions" is not the answer. It's stupid that you need to install an addon for something every bloody browser should have by default and extensions don't work that well compared to fluid Opera's gesture system which even works on internal Opera "pages" where extensions can't interact with them (Add-ons page for example).

What's also baffling is how people don't use gestures more. The amount of time you save moving mouse from middle of the screen to the toolbar and trying to hit the correct button and then returning mouse in middle of the screen when you could have it where you have it and just drag it in direction to execute the gesture. Sure Firefox has back/forward in right click context menu, but it just isn't as fluid or natural as gestures.

I'm clumsy and it's hard for me to avoid accidental dragging. I do not like it when applications go haywire just 'cause I slip my mouse. Or just 'cause my typing brings my good hand too close to a malfunctioning touchpad.

(In reply to RejZoR from comment #20)

It's baffling how Firefox doesn't come with at least 3 basic gestures out of the box:

  • Drag to left to go backwards
  • Drag to right to go forward
  • Drag down to open new tab

I'd avoid adding "Close tab gesture" (usually drag up) coz having tabs closed when you don't want them is super annoying and just not having a gesture for it is a better choice.

it's down to close, it baffles me how chropera is inconsistent with Opera Mini, but no matter the defaults it still has to be configurable

And no, saying "but use muh extensions" is not the answer. It's stupid that you need to install an addon for something every bloody browser should have by default

I do agree that basic feature should be built in but come on, when Firefox still had extensions I had no problem with using Fire Gestures

but now that extensions doesn't work anymore it has to be built in natively

(In reply to MarjaE from comment #21)

I'm clumsy and it's hard for me to avoid accidental dragging. I do not like it when applications go haywire just 'cause I slip my mouse. Or just 'cause my typing brings my good hand too close to a malfunctioning touchpad.

just don't enable them and you are fine

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.