You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: ion-modal sheet allow disabling moving on content drag #30064
I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
An option to be able to disable the behavior of content drag to move between breakpoints would be nice for contents that have moveable features like an image-resizer library.
Describe the Use Case
A image-resizer lib inside modal content, currently the hole sheet modal moves while dragging the image inside the resizer lib.
Describe Preferred Solution
A new option "disableContentBreakpointDrag" or something like that.
Verified on 9.0.6. This is already possible without a new option. The sheet gesture starts from touchstart and mousedown events that bubble up from the content, so stopping those two events on the resizer's element keeps the sheet in place while the image is dragged. The handle and the rest of the content still move the sheet as usual. CSS can't do this, since the drag is handled in JavaScript and touch-action: none doesn't affect it. Stopping pointerdown doesn't work either, because the sheet doesn't listen for pointer events.
<ion-modalid="sheet"><ion-content><divid="image-resizer"><!-- your resizer library mounts here --></div></ion-content></ion-modal><script>constmodal=document.querySelector('#sheet');modal.breakpoints=[0,0.5,1];modal.initialBreakpoint=0.5;constresizer=document.querySelector('#image-resizer');conststopSheetDrag=(ev)=>ev.stopPropagation();resizer.addEventListener('touchstart',stopSheetDrag);resizer.addEventListener('mousedown',stopSheetDrag);</script>
If you'd rather the sheet only move from its handle, add the same two listeners to the ion-content instead.
Since the current API covers this, we're closing it as a feature request. The missing docs are tracked in ionic-team/ionic-docs#4765.
Activity
thetaPC commentedon Oct 1, 2026
Thanks for the report, and sorry for the delay.
Verified on 9.0.6. This is already possible without a new option. The sheet gesture starts from
touchstartandmousedownevents that bubble up from the content, so stopping those two events on the resizer's element keeps the sheet in place while the image is dragged. The handle and the rest of the content still move the sheet as usual. CSS can't do this, since the drag is handled in JavaScript andtouch-action: nonedoesn't affect it. Stoppingpointerdowndoesn't work either, because the sheet doesn't listen for pointer events.If you'd rather the sheet only move from its handle, add the same two listeners to the
ion-contentinstead.Since the current API covers this, we're closing it as a feature request. The missing docs are tracked in ionic-team/ionic-docs#4765.