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__event_type_pointerpressrelease: pointerpress event is triggered twice on each mousedown in IE10. #505

Closed
dfilatov opened this issue Apr 18, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@dfilatov
Copy link
Member

$(document).on('pointerpress', function() {
    console.log('pointerpress');
});
@narqo
Copy link
Member

narqo commented Apr 23, 2014

@dfilatov I've added a test for pointerpressrelease in the issues/505@v2 branch. Could you check it in your IE version, because I can't reproduce this issue.

› git co issues/505@v2
› bem server 
› open desktop.tests/jquery__event_type_pointerpressrelease/simple/simple.html

See query__event_type_pointerpressrelease.tests/simple.blocks/example/example.js for code.

There was a bug in our .bem/make.js / bem-pr configuration, so desktop.tests/'s blocks were included twice :)

@narqo
Copy link
Member

narqo commented Apr 23, 2014

@dfilatov could you check this https://github.com/narqo/test-pointerevents? I'm not sure, but it looks like doc.on('pointerrelease', <handler>) has strange behavior in any browser there.

On <button> press, I get two messages in console:

› press
› release

while in my opinion there should be only first one.

Actually I understand why this is happening, but I don't understand is it correct?

@dfilatov
Copy link
Member Author

Yes, it's a very strange behaviour.
But, when I replaced pointerpress by mousedown and pointerrelease by mouseup -- all became to work as it was expected. I thought that pointerpress/pointerrelease events are transparent wrappers around mousedown/mouseup events for desktops, but ... (

@narqo
Copy link
Member

narqo commented Apr 24, 2014

There is a bug in @deepsweet's jquery-pointerpressrelease.js implementation, which, I think, was fixed in bem-core, but haven't been backported to upstream.

I'll try to dig the original issue more deeply

narqo pushed a commit that referenced this issue Apr 25, 2014
`pointerpress` is triggered twice on each mousedown in IE10
@narqo narqo added this to the 2.2 milestone Apr 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants