content: sheet modal docs should explain how to keep interactive content from dragging the sheet
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 88/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- markdown
研究方向
從 docs/api/modal.mdx 中的 Sheet Modal 區段以及 versioned_docs/version-v8/api/modal.mdx 中對應的區段開始。加入提議的 Interactive content 子區段,包括 touchstart 和 mousedown 監聽器,以及關於 pointerdown 和 CSS 方法的說明。當兩個文件版本都說明如何防止互動內容拖曳 sheet 時,即視為完成。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- MDX
- 星號
- 620
- 分支
- 3.2k
- 平均合併
- 23 小時 3 分鐘
- 30 天內合併 PR
- 50
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ionic-team/ionic-docs 的其他 Issue
-
content
難度 2/5 1-3 小時 新手友好度 86/100
ionic-team/ionic-docs#4705 ·
維護者通常 1 天內回覆
-
content package: angular
難度 2/5 半天 新手友好度 78/100
ionic-team/ionic-docs#4702 ·
維護者通常 1 天內回覆
-
triage
難度 1/5 1 小時以內 新手友好度 80/100
ionic-team/ionic-docs#4546 ·
維護者通常 1 天內回覆
-
content
難度 2/5 1-3 小時 新手友好度 68/100
ionic-team/ionic-docs#4381 · 2 則留言 ·
維護者通常 1 天內回覆
-
content
難度 2/5 1-3 小時 新手友好度 63/100
ionic-team/ionic-docs#4779 · 1 則留言 ·
維護者通常 1 天內回覆
查看 ionic-team/ionic-docs 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 78/100
-
beginner-friendly category:fixtures community enhancement first-timers-only good first issue hacktoberfest help wanted low hanging fruit micro-contribution type: task up-for-grabs
難度 1/5 1 小時以內 新手友好度 85/100
Berserk-hub150/skillhawk#229 · 1 則留言 ·
維護者通常 8 天內回覆
-
changelog investigate
難度 2/5 1-3 小時 新手友好度 65/100
ramnes/notion-sdk-py#423 ·
-
ready-for-agent
難度 2/5 1-3 小時 新手友好度 77/100
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 89/100
duckdb/duckdb-web#7514 ·
維護者通常 1 天內回覆