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

Feature #90: Adding touch compatibility (new event listeners). #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

patricknelson
Copy link

@patricknelson patricknelson commented May 11, 2016

Currently a work in progress; still needs a proper initialization on load. Possibly as a configuration parameter, since naturally you cannot hover over anything with a touch device, but you can swipe. Only works currently if you tap first on the viewport and then swipe around. The touch emulates a mouseenter event. The idea then would probably be to trigger a mouseenter event on any of the touch events in case it hasn't already been triggered.

Currently how I'm doing this outside of this library is with Modernizr, simply looking for a touch class and then initializing it on page load:

if ($('html').hasClass('touch')) viewport.mouseenter();

Again a better solution here would be to wait first for some interaction, since as a plugin, it needs to be concerned only about it self and not initialize due to changes in global state (i.e. page load).

@patricknelson patricknelson mentioned this pull request May 12, 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.

1 participant