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

jquery__events_type_pointernative: pointerdown event works incorrectly in IE Edge #1066

Closed
narqo opened this issue Jun 19, 2015 · 1 comment
Assignees
Milestone

Comments

@narqo
Copy link
Member

narqo commented Jun 19, 2015

Looks like our pointerevents polyfill works badly in the upcoming IE Edge. At least blocks select and dropdown from bem-components 2.1.x are closing immediately after the user clicks on their button.

Here are the suggestions from Microsoft Edge Team, sent to the front-end team of "[project with bem-components]":

[..] When a user clicks on the drop down list [e.g. block select], this issue occurs because there are two sets of events that fire for the down event, which then triggers listeners for up events. In one case, there is a check for msPointerEnabled which listens for the MS prefixed pointer, or fallback to mouse. In another case, there is a check for non-prefixed pointerdown. In previous versions of Internet Explorer when the prefixed msPointer was enabled, this listened to pointerdown twice, which internally resolved to the same event and only fired once. Now in Windows 10, with prefixed mspointer disabled, [the project with bem-component] listens to mousedown and pointerdown, which triggers the events twice, so the drop downs are double toggled.

Here is the logic that listens to either mspointer events or mouse:
T.msPointerEnabled ? v.registerSource("ms", I) : (v.registerSource("mouse", E), "undefined" != typeof e.ontouchstart && v.registerSource("touch", x)), v.register(a);

This triggers their own generated pointerdown events which trigger the pointerpress events. It is recommended for [the project with bem-component] to add a check for non-prefixed pointerEnabled which listens to non-prefixed versions and this should still work with the duplicated listener since it will be the same event.

@arikon
Copy link
Member

arikon commented Jun 19, 2015

We are going to use PEP in islands: https://github.com/jquery/PEP

@tadatuta tadatuta added this to the 2.7 milestone Jun 25, 2015
@narqo narqo added ready and removed in progress labels Jul 7, 2015
@narqo narqo removed the ready label Jul 7, 2015
narqo pushed a commit that referenced this issue Jul 7, 2015
…y in IE Edge

Use native `PointerEvent` if supported.
fix #1066

Optimise PointerMap class: use native Map class if supported (port
of jquery-archive/PEP#190).
narqo pushed a commit that referenced this issue Jul 7, 2015
jquery__events_type_pointernative: pointerdown event works incorrectly in IE Edge
narqo pushed a commit that referenced this issue Jul 7, 2015
…y in IE Edge

Use native `PointerEvent` if supported.
fix #1066

Optimise PointerMap class: use native Map class if supported (port
of jquery-archive/PEP#190).
narqo pushed a commit that referenced this issue Jul 7, 2015
jquery__events_type_pointernative: pointerdown event works incorrectly in IE Edge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants