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

only override behaviour if we really have a click delay - not just every browser supporting 'ontouchstart' #6

Closed
jamuhl opened this issue Feb 25, 2013 · 4 comments

Comments

@jamuhl
Copy link
Contributor

jamuhl commented Feb 25, 2013

I run into an issue testing our site with casperjs (phantomjs). When i added backbone.touch the tests failed.

I changed line 32 to:

isTouch : 'ontouchstart' in this.document && /iPhone|iPod|iPad|Android|BlackBerry|PlayBook/.test(navigator.userAgent),

like this only mobile devices and tablets get the click events changed and all tests green again.

@nervetattoo
Copy link
Owner

In which ways does it fail? Does phantomjs come with touch* handlers?
I guess that kind of fix solves it mostly, but I would prefer to not use device detection as thats a list that needs to be maintained in the future.

@jamuhl
Copy link
Contributor Author

jamuhl commented Mar 4, 2013

Yes. Phantomjs implements some of the touch events. Another option would be to explicit look if it is phantomjs, like here:

https://github.com/cheeaun/tappable/pull/11/files

But actually i'm not sure if it's a good idea - feels wrong.

@nervetattoo
Copy link
Owner

Since it seems like this will be corrected in phantomjs at some point (given the attitude of the maintainer) I think doing specific sniffing of phantomjs for now is my preferred solution. Feel free to do a pull request, if not I will add it later.

@jamuhl
Copy link
Contributor Author

jamuhl commented Mar 4, 2013

added a PR.

@jamuhl jamuhl closed this as completed Mar 4, 2013
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

No branches or pull requests

2 participants