-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
Hammer blocking scroll #10541
Comments
Add a DI provider with an instance of Your question sounds like a support request. Please use the issue tracker only for bugs and feature requests. Use gitter and StackOverflow for support request. |
That will fix the issue for us, but I'm not so sure closing immediately is the best solution because every app that uses Hammer and binds to a hammer event cannot scroll with the default config. Thanks, |
Could you please check the doc (angular.io) and if nothing is mentioned there then create a ticket on https://github.com/angular/angular.io ? Thanks for your help |
@danbucholtz I've looked through the Hammerjs docs. Can't figure out what/how to pass in the HammerGestureConfig in order to make vertical scrolling work. Also searched google, no luck. Even placed a small bounty on StackOverflow. Still nothing. Could you share your HammerGestureConfig that made vertical scrolling work?
Vertical scrolling still doesn't work. EDIT: Sorry, I've just Made it work. My bad. Should have been enable: false instead of enabled: false. |
Can someone share a working solution that allows vertical scrolling when using swipeleft and swiperight? I cannot for the life of me figure out what the config should look like. This is what I have now:
How do you set the |
EDIT: I just saw (after posting the below code) that I already provided the same code above a few months ago :) @chrillewoodz This is what works for me, in my
Unfortunately, I haven't found a solution that doesn't disable pinch and rotate. I assume the |
@chrillewoodz Did you figure this out? I'm experiencing the same dilemma and have yet to figure out a solution. |
I got the best results with following HammerGestureConfig:
or you build the Hammer instance manually in your class. Then you have better control about the recognizers which needs to be registered and there is no global configuration for all manager instances. If you want to use the events on Desktop as well, it seems to work better when the touchemulator is also imported. |
+1 for this issue — I cannot scroll mobile page if I start moving the finger on Hammer container — it just prevents the page from scrolling. For example, here is my Hammer container:
Nothing above helps, I made this config, but it does not solve the vertical scroll problem:
|
does it help with |
@perg where can i get all the codes? It works with any code — if i use |
You find the codes in the documentation section API. 6 is horizontal. |
@perg thank you, i did the same and it works :) |
can you provide working example.thanks |
This works for me
|
Hello @perg @artuska @elron ,
|
@gtsopour a quick guess would be to add
Try this and let us know if it worked for you |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a ... (check one with "x")
Current behavior
If I listen for a hammer.js event on an element, it blocks vertical scrolling.
Expected/desired behavior
I would not expect scrolling to be blocked
Reproduction of the problem
ng new my-project-of-doom
<head></head>
block.<script src="http://hammerjs.github.io/dist/hammer.min.js"></script>
ng serve
and open the page on a mobile device (I tested on iPhone 6S)./node_modules/@angular/platform-browser/src/dom/events/hammer_gestures.js
app.component.ts
so it re-compiles.From the Hammer.js docs:
Please let me know what I can do to help resolve this issue.
Thanks,
Dan
The text was updated successfully, but these errors were encountered: