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

ghostclicks and iScroll #42

Closed
kosich opened this issue Mar 31, 2015 · 3 comments
Closed

ghostclicks and iScroll #42

kosich opened this issue Mar 31, 2015 · 3 comments

Comments

@kosich
Copy link

kosich commented Mar 31, 2015

For some reason, while using ng-hammerjs + ng-iscroll ghostClicks prevention some times fails: tap event handler triggers twice and even scrolls parent ng-iscroll element

some settings I'm using:
ng-hammer preventGhost : true -- need it for touch laptops
ng-iscroll preventDefault: false -- need it for forms to interact properly (see this issue)

so I've come up with a bit different ghost clicks elimination implementation, based on blocking touch events for some time after mouse events were triggered on the element and vice versa.

Please, see this gist

replace preventGhosts function in your angular.hammer.jswith code from the gist ( uncomment the console calls if needed to see whats happening )

Note: this has been tested only against chrome's "notebook with touch" emulation and HAS NOT been tested on a real device.

So, to sum up: if I'm not alone in running into such an issue and if this code works well on real touch devices I could create a PR.

Thanks.

@kosich
Copy link
Author

kosich commented Mar 31, 2015

ok, had to close it to make a quickfix. now it seem to work fine ( again, in emulation ). Please, provide some real device experience.

@kosich kosich reopened this Mar 31, 2015
@RyanMullins
Copy link
Owner

Significant changes were merged with #55, please verify that this issue persists with those changes and update accordingly.

@kosich
Copy link
Author

kosich commented Jun 30, 2015

can't retest it atm, so since noone confirmed having the same issue, Ima close this one. Thx

@kosich kosich closed this as completed Jun 30, 2015
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