material icon indicating copy to clipboard operation
material copied to clipboard

md-bottom-sheet does not allow scrolling

Open omida86 opened this issue 11 years ago • 19 comments

I'm trying to implement scrolling within md-bottom-sheet but I'm not successful at all. I am able to scroll on the pc with the mouse scroll, but when trying to scroll in safari on Iphone, the md-bottom-sheet closes when swiping down.

I have tried different solutions, with one being:

<md-bottom-sheet style="height:100%">
 <md-content style="overflow-y:scroll;height:100%">

</md-content>
</md-bottom-sheet>

Any suggestions?

Thanks

omida86 avatar Mar 29 '15 15:03 omida86

+1 me too Il 29/mar/2015 17:34 "omida86" [email protected] ha scritto:

I'm trying to implement scrolling within md-bottom-sheet but I'm not successful at all. I am able to scroll on the pc with the mouse scroll, but when trying to scroll in safari on Iphone, the md-bottom-sheet closes when swiping down.

I have tried different solutions, with one being:

Any suggestions?

Thanks

— Reply to this email directly or view it on GitHub https://github.com/angular/material/issues/2073.

marco64bit avatar Mar 30 '15 18:03 marco64bit

+1 me too

dacre-denny avatar May 05 '15 04:05 dacre-denny

+1. (as of 0.9.4) Bottomsheet content does not scroll on mobile device (iPhone) without this workaround. Attach the following event handler to the bottomsheet element.

        $(element).find('md-content').on('touchmove',function(evt) { 
          evt.stopPropagation();
        });

jjf1 avatar May 23 '15 02:05 jjf1

+1

vautrinr avatar Jul 17 '15 15:07 vautrinr

+1

tomiwaAdey avatar Aug 02 '15 07:08 tomiwaAdey

+1

d-bitz avatar Aug 24 '15 03:08 d-bitz

This seems to be a regression since version 0.10.1. If your bottom sheet container is long it will not allow you to scroll to the content. At one point there was an auto scroll feature that would scroll to the bottom sheet content if necessary. That doesn't seem to be the case anymore.

oste avatar Sep 12 '15 22:09 oste

I can confirm this is still not working.

omida86 avatar Sep 29 '15 10:09 omida86

+1

edgar131 avatar Oct 15 '15 00:10 edgar131

+1

vas1468 avatar Dec 09 '15 17:12 vas1468

+1 Taken from Material Design Spec 1

manish2535 avatar Jan 22 '16 14:01 manish2535

since we are on 1.0.4 now: any updates here?

davidenke avatar Feb 01 '16 11:02 davidenke

Can confirm this is still not working in 1.0.5.

TheoNolasco avatar Feb 16 '16 00:02 TheoNolasco

+1

tipodisimmia avatar Mar 22 '16 09:03 tipodisimmia

+1

vikasraok avatar Apr 06 '16 13:04 vikasraok

+1

Until fixed I stick to a custom directive attached to md-content:

.directive('stopTouchEvent', function () {
    return {
        restrict: 'A',
        link: function (scope, element) {
            element.on('touchmove', function (evt) {
                evt.stopPropagation();
            });
        }
    };
})

jonaszuberbuehler avatar Apr 15 '16 08:04 jonaszuberbuehler

+1

alexnix avatar Aug 01 '16 10:08 alexnix

With Angular Material v1.1.0, my bottom sheet is tall extending beyond the iPhone's screen height, but I can't scroll either (the bottom sheet starts moving away). Unfortunately, the stopTouchEvent directive workaround isn't working for me applied to a manually inserted <md-content> as the first child of the <md-bottom-sheet>.

majew7 avatar Sep 14 '16 17:09 majew7

  • 1 for a fix As A workaround, i found this also works: it is based in the premise that you set an explicit height to you bottomsheet (f.i. 80%). This is prob not desireable in most cases... The content of your sheet should be flex-box based (i.e. layout=column) now you can set you md-content to grow (flex), and it will be scollable. Still the whole page may scroll when you reach the and. There I found the above directive by @jonaszuberbuehler very useful.

But still this should be fixed, and I don't think it deserves the label 'edge-case'. It is metioned in the material design spec, and on smaller screens it is really not that uncommon to run out of space, specially on landscape orientation.

Remco75 avatar Jan 21 '17 11:01 Remco75