Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Material's custom swipe recognizer sets touch-action: none #6484

Closed
jelbourn opened this issue Aug 15, 2017 · 4 comments
Closed

Material's custom swipe recognizer sets touch-action: none #6484

jelbourn opened this issue Aug 15, 2017 · 4 comments
Labels
area: many Area label for issues related to many components P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@jelbourn
Copy link
Member

jelbourn commented Aug 15, 2017

The custom recognizers in GestureConfig are causing touch-action: none to always be added to elements with any hammer event. This is problematic because it will prevent normal scrolling. The swipe recognizer seems to be the culprit (with both pan-y and pan-x actions being tied to the recognizer, even though we only want pan-y)

We should probably only be adding recognizers that correspond to the events being listened for. This would require a (non-breaking) change in @angular/platform-browser to pass the event name to the buildHammer function.

@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Aug 15, 2017
@kheiligh
Copy link

for me - i was able to fix this with
Hammer.defaults.touchAction = 'pan-y'; to get scrolling working, and (swiperight) and (swipeleft) still work fine

@andrewseguin andrewseguin added the area: many Area label for issues related to many components label Jun 11, 2020
@intellix
Copy link

intellix commented Jun 16, 2020

Got this after updating to Angular 9 and this fixed it for us: hammerjs/hammer.js#1014 (comment)

Was originally going to go for this which worked too:

.my-thing {
  touch-action: pan-y !important;
}

@jelbourn
Copy link
Member Author

Closing this since we have completely removed all HammerJS code in v10.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 17, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
area: many Area label for issues related to many components P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

4 participants