Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

After dragging knob with mouse, keyboard tap events will stop working on rest of page. #186

Open
shc023 opened this issue Apr 21, 2017 · 3 comments

Comments

@shc023
Copy link

shc023 commented Apr 21, 2017

Description

After dragging knob with mouse, keyboard tap events will stop working on rest of page.

Expected outcome

Dragging knob with mouse does not interfere with subsequent keyboard taps on the rest of the page.

Actual outcome

After dragging the knob with the mouse, the rest of the page will stop responding to keyboard taps.

Live Demo

https://jsfiddle.net/2q3fqehz/167/

Steps to reproduce

  1. Go to live demo above, click / tab focus to the button and press enter a few times, observer console says "tapped".
  2. Drag the knob with mouse (do not click anything else on the page after letting go)
  3. Tab one time to focus the button.
  4. Press enter a few times, notice that the console does not say "tapped" anymore.

Doing the following seems to un-break the page.
5. Mouse click on the button, observe that console says "tapped" again.
6. Press Enter while focus is on the button, observe that issue goes away and console says "tapped" again.

Browsers Affected

Chrome is affected, haven't tested on other browsers yet.

@danbeam
Copy link
Contributor

danbeam commented Apr 21, 2017

@keanulee @frankiefu

@keanulee
Copy link
Contributor

@azakus This seems to be related to gestures - it doesn't happen if I change the button's tap listener to click.

@dfreedm
Copy link
Contributor

dfreedm commented May 4, 2017

So, the track gesture will disable tap to prevent accidental taps. This is usually ok because tap resets the "prevent" flag on any mousedown or touchstart. However, the Enter key will only send a click event, which does not cause the state machine to reset. Probably just need to add a keydown listener to tap gesture to reset.

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

No branches or pull requests

4 participants