md-bottom-sheet does not allow scrolling
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
+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.
+1 me too
+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();
});
+1
+1
+1
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.
I can confirm this is still not working.
+1
+1
+1 Taken from Material Design Spec
since we are on 1.0.4 now: any updates here?
Can confirm this is still not working in 1.0.5.
+1
+1
+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();
});
}
};
})
+1
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>.
- 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.