New issue
Advanced search Search tips

Issue 887436 link

Starred by 2 users

Issue metadata

Status: Closed
Owner: ----
Closed: Oct 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Task



Sign in to add a comment

auxclick event not fired if omni-scroll can activate from middle click

Reported by bloodsp...@gmail.com, Sep 20

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3556.0 Safari/537.36

Steps to reproduce the problem:
1. Add auxclick event handler to any element inside another element that has an active scrollbar.
2. Middle-click on the element with the event handler

What is the expected behavior?
Auxclick fires regardless of Omni-scroll activating.

What went wrong?
If the element can be scrolled Omni-scroll activates on the mousedown event and for some reason prevents the auxclick event from firing.

If the mousedown event is cancelled, the auxclick event is fired. This leaves developers with unexpected failures as soon as the element gains a scrollbar.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 71.0.3556.0  Channel: n/a
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Works as expected in Firefox. Fails in Chrome, Opera.
 
crbug auxclick.html
1.6 KB View Download
Labels: Needs-Feedback
Status: Untriaged (was: Unconfirmed)
I don't think we should fire auxclick in that scenario. Browser has taken over the action and not only we don't fire auxclick but also we don't open a link in a new tab. So all related actions with respect to click is going to be hidden. Is there a particular usecase that you need both auto scroll as well as auxclick?
The main concern here is for the web developer that forgets, or simply does not know to implement a handler on the mousedown event to cancel the event.

This leaves that code with an edge-case bug that the poor users can't work-around.

So no, there isn't a use-case that you need both auto-scroll and auxclick, but it would be better for the code to fail by having both events occur, than to completely prevent the auxclick event from firing at all.

Consider that from the developer's point-of-view, the scroll behaviour may arise in situations that could be edge cases (such as a zoomed window).

In the current scenario, the user has no work-around to activate the auxclick behaviour if the container becomes scrollable. In the proposed scenario, the unexpected scrolling behaviour is an annoyance.

Let us not forget, the user may not make the connection between the appearance of the scroll behaviour and the expected middle-click behaviour not functioning, and there's no guarantee that aforementioned web developer will test on the exact same screen layout that the "bug" is encountered.

So this is not an argument about how the browser should behave in a perfect world, because that's assuming every developer has absolute knowledge of behavioural disparities between browsers. Rather, this is an argument for practicality.
Cc: bokan@chromium.org
I'm cc'ing bokan@ here as he knows more about the auto scroll feature. bokan@ do you know whether we can do anything about this?

However, in general I cannot buy what you are saying.
The same argument you are making holds for virtually every other browser behavior. For example if a developer forgets to have a dragstart handler and preventDefault on that user may start drag and as a result you are going to miss all the mouse events for the rest of the duration of the drag. The same for normal scrolling say with touch. If they forget to prevent default touchstart (or set a touch-action:none) browser starts scrolling and you are not going to get the rest of the pointerevent stream for that finger.

I totally agree though that in the case of scrollable pages it might be more invisible to the development team while testing the feature. One thing we try to
Labels: -Type-Bug Type-Bug-Regression
Labels: -Pri-2 -Type-Bug-Regression Pri-3 Type-Task
I agree with nzolghadr@ here. It doesn't make much sense to activate both autoscrolling (what you call omniscroll) and execute an auxclick action - it should do one or the other. You could argue that we shouldn't activate autoscroll if there's an auxclick handler registered but that might be surprising and I'm not sure we'd prioritize something like that.

IMHO, if the container shouldn't be scrollable, the page should specify that using overflow: hidden.
Status: Closed (was: Untriaged)

Sign in to add a comment