New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mouse back/forward buttons: page navigation or JS events? #191
Comments
B is already the current behaviour for middle click and autoscroll, so that would seem consistent to me. |
doesn't the OS send back/forward command to the browser in this case, so there isn't really much pointer events related happening? (I should re-check the implementation.) |
Chrome gets regular mouse events from OS but back/forward button presses are not forwarded to the content layer. |
@smaug---- I believe on Windows you get a XBUTTON event if you don't indicate it is handled then it will send you an APPCOMMAND. Chrome doesn't follow this mode for context menus and I'm proposing Chrome doesn't follow it for these buttons either. This would be similar to how it works on X11. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms645601(v=vs.85).aspx#_win32_XBUTTONs Where should the default action occur. I agree with that option B is the less likely to cause the context menu issues all over again. |
I can't test current behavior right now but IIRC the default action of left click happens on button up rather than button down, which conceptually makes more sense to me given that just pushing the button down doesn't necessarily mean that that alone is the expected to do anything, I may push the button down, do a move operation followed by an eventual button up as opposed to actually clicking. Same argument could be had for X1 and X2, even if those are of course far less commonly used buttons... |
In general there isn't really consistency when default handling of mouse "actions" happens. |
Personally I'd prefer to make this a default action of the auxclick as opposed to mouseup but I guess there are situations that the auxclick doesn't get dispatched? like if the clicked node is removed from the tree and is no longer connected to the document? Perhaps we do want that behavior? |
Navigation being a default action in Between Do we have any data on how popular "forward/back buttons for navigation" is? Or what fraction of websites cancel |
I think we need to update the UIEvent spec to contain these button definitions. And I don't see why putting it on |
@dtapuska mentions the UIEvent spec...is this a case where we can/should defer decisions here to that spec (i.e. not something to define directly in PE)? |
Discussed in PEWG today. Decided to close this for now, as this feels out of scope purely for PE. There's inconsistency at the moment between platforms on when things happen when these buttons are pressed (on the down, or on the up), and they don't currently fire any other events like mouse events(?). So this needs to be discussed more fundamentally first (in UI Events?). If something comes from discussion there, we can revisit to see if events should be pointer events or not (or some more high-level abstract event like |
In all browsers I tested (Edge, FF on Linux, Chrome on Linux/Android), the back/forward button-downs in a 5-button mouse performs backward/forward page navigation. This is true even in full-screen mode for FF & Chrome (Edge doesn't seem to have the mode).
So the X1(back) and X2(forward)
button
/buttons
values in the spec seem useless in all current implementations!If we want to standardize a reasonable behavior here, I see the following possibilities from "most breaking" to "least":
button
/buttons
values could be useful is full-screen gaming, then the spec should say so, and leave the current non-full-screen behavior unchanged.Thoughts?
The text was updated successfully, but these errors were encountered: