Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

bottom-sheet: touch-action not reverted on cleanup #11147

Closed
jonaszuberbuehler opened this issue Mar 2, 2018 · 5 comments · Fixed by #11845
Closed

bottom-sheet: touch-action not reverted on cleanup #11147

jonaszuberbuehler opened this issue Mar 2, 2018 · 5 comments · Fixed by #11845
Assignees
Labels
Milestone

Comments

@jonaszuberbuehler
Copy link

Bug

After mdBottomSheet is hidden touch-action: pan-x; is not removed from parent element (ie body) preventing vertical scrolling on mobile devices.

What is the expected behavior?

Any added touch-action should be reset to initial state.

What is the current behavior?

The added touch-action ist not removed on

onCleanup: function(element) {
if (this.oldTouchAction) {
element[0].style[touchActionProperty] = this.oldTouchAction;
}
.

Which versions of AngularJS, Material, OS, and browsers are affected?

AngularJS 1.6.6, Material 1.1.7, Android, Chrome

@Splaktar Splaktar changed the title Touch-action not reverted on cleanup bottom-sheet: touch-action not reverted on cleanup Mar 3, 2018
@Splaktar
Copy link
Member

Splaktar commented Mar 3, 2018

#9179 does a little bit with the bottom-sheet cleanup, but it doesn't appear to fix this issue in the gesture.js onCleanup function.

@Splaktar
Copy link
Member

Splaktar commented Mar 3, 2018

I am able to reproduce this on https://material.angularjs.org/latest/demo/bottomSheet where it doesn't clean up the style on

<div class="demo-content bottomSheetDemo1 ng-scope" style="touch-action: pan-x;">

@Splaktar Splaktar added this to the 1.1.9 milestone Mar 3, 2018
@Splaktar Splaktar self-assigned this Mar 3, 2018
@Splaktar Splaktar modified the milestones: 1.1.9, 1.1.10 Apr 19, 2018
@Splaktar Splaktar modified the milestones: 1.1.10, 1.1.11 Jun 19, 2018
@Splaktar Splaktar modified the milestones: 1.1.11, 1.1.12 Sep 10, 2018
@Splaktar Splaktar modified the milestones: 1.1.12, 1.1.13 Jan 3, 2019
@Splaktar Splaktar modified the milestones: 1.1.13, 1.1.14 Feb 10, 2019
@Splaktar Splaktar modified the milestones: 1.1.14, g3: sync Feb 15, 2019
@Sayene
Copy link

Sayene commented Jul 17, 2019

onCleanup does not remove touch-action - it only restores its previous value (if was set) - that is apparently a bug. As a work-around: style="touch-action:auto;" can be set to parent element - so it gets restored by onCleanup - allowing to scroll after bottom-sheet was closed.

@mebibou
Copy link

mebibou commented Oct 11, 2019

We have a very similar (if not the same) issue now on iOS 13 where pages do not scroll at all anymore after the first click on the navbar bottom-sheet, preventing any user from scrolling on any pages in our production website! by debugging what I saw was a touch-action: pan-x added directly on the body element! This needs fixing ASAP as I imagine many people finding the same issue now (FYI, this did not happen on iOS 12)

This is a critical issue

@Splaktar Splaktar modified the milestones: g3: sync, 1.1.22 Jan 17, 2020
@Splaktar Splaktar added the has: Pull Request A PR has been created to address this issue label Jan 17, 2020
@Splaktar
Copy link
Member

PR #11845 fixes this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants