content: sheet modal docs should explain how to keep interactive content from dragging the sheet
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- markdown
- Domain
- documentation
Research direction
Start with the Sheet Modal section in docs/api/modal.mdx and the corresponding section in versioned_docs/version-v8/api/modal.mdx. Add the proposed Interactive content subsection, including the touchstart and mousedown listeners and the notes about pointerdown and CSS approaches. Done means both documentation versions explain how to keep interactive content from dragging the sheet.
Written by the indexing model from the issue text.
Description
URL
https://ionicframework.com/docs/api/modal#sheet-modal
Issue Description
Any drag on a sheet modal's content also moves the sheet between breakpoints. This breaks content that needs its own drag, such as image resizers, drawing or signature pads, and other vertical-swipe widgets. It came up in ionic-team/ionic-framework#30064 and earlier in ionic-team/ionic-framework#24715.
The current API already supports this, but the docs don't mention it. The sheet gesture starts from touchstart and mousedown, so stopping those two events from bubbling out of an element keeps the sheet still while that element is dragged:
const stopSheetDrag = (ev) => ev.stopPropagation();
el.addEventListener('touchstart', stopSheetDrag);
el.addEventListener('mousedown', stopSheetDrag);
Stopping pointerdown does not work, and neither do CSS approaches such as touch-action: none. Both are the first things people try. Applying the same listeners to ion-content makes the sheet draggable only from the handle and header.
Suggested addition: a short "Interactive content" subsection under Sheet Modal with the snippet above and those two notes, in docs/api/modal.mdx and versioned_docs/version-v8/api/modal.mdx.
- Dominant language
- MDX
- Stars
- 620
- Forks
- 3.2k
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 52
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ionic-team/ionic-docs
-
content
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ionic-team/ionic-docs#4804 ·
Maintainers usually reply within 1 day
-
content
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ionic-team/ionic-docs#4802 ·
Maintainers usually reply within 1 day
-
content
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ionic-team/ionic-docs#4705 ·
Maintainers usually reply within 1 day
-
content package: angular
Difficulty 2/5 Half a day Newbie friendliness 78/100
ionic-team/ionic-docs#4702 ·
Maintainers usually reply within 1 day
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 80/100
ionic-team/ionic-docs#4546 ·
Maintainers usually reply within 1 day
All issues in ionic-team/ionic-docs
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 66/100
betagouv/conseillers-entreprises#4770 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
awsdocs/amazon-eks-user-guide#1257 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
status:untriaged
Difficulty 1/5 Under an hour Newbie friendliness 86/100
midnightntwrk/servicedesk#275 ·
Maintainers usually reply within 1 day