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

Closing on mobile, bind touchstart #94

Merged
merged 1 commit into from Jun 28, 2018

Conversation

kevincobain2000
Copy link
Contributor

Fixes #39

Current bindings are listening to just click events.
https://github.com/kamranahmedse/driver.js/blob/master/src/index.js#L72-L76

  bind() {
    this.window.addEventListener('resize', this.onResize, false);
    this.window.addEventListener('keyup', this.onKeyUp, false);
    this.window.addEventListener('click', this.onClick, false);
  }

I haven't tested it yet, but adding touchstart to bindings should solve the closing problem on mobile devices.

    this.window.addEventListener('touchstart', this.onClick, false);

@kevincobain2000 kevincobain2000 mentioned this pull request May 12, 2018
@kamranahmedse kamranahmedse merged commit ee52d45 into kamranahmedse:master Jun 28, 2018
@kamranahmedse
Copy link
Owner

thanks

kamranahmedse pushed a commit that referenced this pull request Feb 19, 2019
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.

None yet

2 participants