Skip to content

on-tap not working on Firefox #941

Description

@apalacios-modpow

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.

Activity

  1. apalacios-modpow commented on Nov 18, 2014

    @apalacios-modpow
    Author

    I think this is also why:

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

    Left menu can't be expanded on firefox.

  2. apalacios-modpow commented on Nov 18, 2014

    @apalacios-modpow
    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;
    },
    
  3. ebidel commented on Nov 18, 2014

    @ebidel
    Contributor

    @azakus are you aware of this?

  4. dfreedm commented on Nov 18, 2014

    @dfreedm
    Member

    Working for me in FF 33.1.1 on OSX

  5. dfreedm commented on Nov 18, 2014

    @dfreedm
    Member

    And Windows 8.1

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

  6. arthurevans commented on Nov 18, 2014

    @arthurevans

    Can't repro in Win 7, either.

  7. apalacios-modpow commented on Nov 19, 2014

    @apalacios-modpow
    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.

  8. ashkhn commented on Nov 22, 2014

    @ashkhn

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

  9. regdoug commented on Nov 23, 2014

    @regdoug

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

  10. doc-l2 commented on Nov 24, 2014

    @doc-l2

    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;

  11. regdoug commented on Nov 25, 2014

    @regdoug

    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.

  12. dfreedm commented on Nov 26, 2014

    @dfreedm
    Member

    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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions