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

fix horsey on IE 9+ #28

Merged
merged 5 commits into from
Jan 18, 2016
Merged

fix horsey on IE 9+ #28

merged 5 commits into from
Jan 18, 2016

Conversation

dereke
Copy link
Contributor

@dereke dereke commented Nov 27, 2015

this is a fix for issue #23

this works better across browsers as the previous
attempt to capture focus on the documentElement
did not work on IE (the target is set incorrectly)
@dereke dereke changed the title use pointer events if available - this allows horsey to work on IE 11 fix horsey on IE 9+ Dec 2, 2015
@dereke
Copy link
Contributor Author

dereke commented Dec 2, 2015

Originally I was trying to listen to the onpointerdown event in IE, however it turned out that the actual issue was that we were listening to the focus event on the document element and in IE the target of that event is the document rather than the element which received the focus (like it is in chrome/firefox). The focus event was being used to hide the list if the target was not an item in the list. Obviously in IE the target was never an item in the list so this would not work and you could never select an item with the mouse.

This change listens to the keydown event and if the tab key is pressed then it hides the list. It relies on autoHideOnClick being true to hide the list in the case that some other element is clicked.

bevacqua added a commit that referenced this pull request Jan 18, 2016
@bevacqua bevacqua merged commit c7f8039 into bevacqua:master Jan 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants