FlexSlider
FlexSlider copied to clipboard
After 3 seconds of inactivity, any keyup event will trigger whichever control element has focus
To reproduce this issue;
- Set up a new slider with default settings
- Interact with the slider in some way (e.g. press the Next button)
- Wait for three seconds
- Press any key on your keyboard (also, hitting Tab results in interesting behaviour)
- The currently focussed control element will fire its behaviour
I believe this bug was introduced on commit 649b869, where "keyup" was added to namespace.eventType. The delegates that fire on namespace.eventType are supposed to be pseudo-click type events - to which "keyup" does not belong (unless it's the enter key, which registers as a click anyway).
I suggest removing "keyup" from the namespace.eventType string because it doesn't fulfil its intended purpose well.
Alternatively, you could leave the keyup event in there, but you would need to check the event.keyCode on the delegates that use namespace.eventType so it doesn't just fire on any key.
I'm having this exact issue.
I am also experiencing this issue in Chrome and Edge. Having trouble pinpointing the cause. I have tried every combination of touch, keyboard, pauseOnAction, pauseOnHover, but the result remains the same. Has anyone had luck with a workaround?
Removing keyup from eventType fixes the problem. The keyup event is handled correctly further on, where the event is checked for left or right arrow keys.