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

Problem with PhantomJS and touch events #9

Open
felquis opened this issue Jan 2, 2015 · 1 comment
Open

Problem with PhantomJS and touch events #9

felquis opened this issue Jan 2, 2015 · 1 comment

Comments

@felquis
Copy link
Contributor

felquis commented Jan 2, 2015

The problem is that 'ontouchevent' in window return true in PhantomJS and there's no way to disable touch events in PhantomJS on runtime. For this reason, the tests with mouseup are failing.

And because this, the tests for libraries are also failing because when ontouchevent is present we don't actually use libraries to delegate the events but addEventListener.

We could use !global.window.mochaPhantomJS in this line:

if ('ontouchstart' in global && !global.window.mochaPhantomJS) { ... }

But I don't think this is a good solution.

@EvandroLG
Copy link
Owner

You are right, this solution is not good - we should not mix the logic of the tests within the main code.
A solution to it is: make public the isTouch attribute and within the test change it to false or true.

But in fact, phantom has another problem that I need to solve. It don't the Event object.
Because of it, I'm just running the tests in the browser for now =/

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