Skip to content
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

on-tap not working on Firefox #941

Closed
apalacios-modpow opened this issue Nov 18, 2014 · 12 comments
Closed

on-tap not working on Firefox #941

apalacios-modpow opened this issue Nov 18, 2014 · 12 comments
Assignees

Comments

@apalacios-modpow
Copy link

Hi,

Thanks for your support in advance, after updating polymer to version 0.5.1, every 'on-tap' call is not working on Firefox (it works fine on Chrome and Explorer).

A.

@apalacios-modpow
Copy link
Author

I think this is also why:

https://www.polymer-project.org/docs/elements/

Left menu can't be expanded on firefox.

@apalacios-modpow
Copy link
Author

Hi,

I have tracked the issue until 'polymer.js' line 1951. Looks like 'e.buttons' is 1 on 'Firefox' making the next function return a bad result:

shouldTap: function(e, downState) {
  var tap = true;
  if (e.pointerType === 'mouse') {
    // only allow left click to tap for mouse
    tap = (e.buttons ^ 1) && (downState.buttons & 1);
  }
  return tap && !e.tapPrevented;
},

@ebidel
Copy link
Contributor

ebidel commented Nov 18, 2014

@azakus are you aware of this?

@dfreedm
Copy link
Member

dfreedm commented Nov 18, 2014

Working for me in FF 33.1.1 on OSX

@dfreedm
Copy link
Member

dfreedm commented Nov 18, 2014

And Windows 8.1

@apalacios-modpow, what version of Firefox, and what platform, is this showing on?

@dfreedm dfreedm closed this as completed Nov 18, 2014
@dfreedm dfreedm reopened this Nov 18, 2014
@arthurevans
Copy link

Can't repro in Win 7, either.

@apalacios-modpow
Copy link
Author

I am using Firefox 33.1 on Gnome 3.12.2 (Fedora), maybe it is a "Firefox" for Linux issue but it worked until last release.

@ashkhn
Copy link

ashkhn commented Nov 22, 2014

Facing the same issue with FIrefox 33 on Ubuntu. Works perfectly on Windows/OSX and other browsers

@regdoug
Copy link

regdoug commented Nov 23, 2014

I am also experiencing this with Firefox 33.1.1 on Arch Linux.

@doc-l
Copy link

doc-l commented Nov 24, 2014

I could also replicate this issue on FF for Linux Mint. I also found the issue. This commit broke it

googlearchive/polymer-gestures@748b65c

Which later was refactored by these two commits:

googlearchive/polymer-gestures@82a3b23
googlearchive/polymer-gestures@7f69799

The point is that the e.buttons is different on FF 33.0 for Linux than it is on Windows or Chrome on Linux (maybe this is a bug for FF for Linux..?).

A temporary fix is to change this:

tap = (e.buttons ^ 1) && (downState.buttons & 1);

into this:

tap = downState.buttons & 1;

@regdoug
Copy link

regdoug commented Nov 25, 2014

From the Mozilla Developer Network:

Gecko supports the buttons attribute on Windows, Linux (GTK), and Mac with the following restrictions:

  • On Windows, if you install a mouse driver, and its utility software allows you to customize button actions (e.g., IntelliPoint and SetPoint), the middle (wheel) button, the 4th button, and the 5th button might not be set, even when they are pressed.
  • On Linux (GTK), the 4th button and the 5th button are not supported. In addition, a mouseup event always has the releasing button information in this attribute value.
  • On Mac OS X 10.5, the buttons attribute always returns 0 because there is no platform API for implementing this feature.

The result is that e.buttons = 1 on Firefox Linux, and since 1 ^ 1 = 0, tap is false.

It doesn't indicate whether they plan to change this behavior (which doesn't conform to the spec) in the future or if their implementation will remain this way due to the way the underlying system treats mouse events.

@dfreedm
Copy link
Member

dfreedm commented Nov 26, 2014

Duplicate of googlearchive/polymer-gestures#77, which is already fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants