Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

content: sheet modal docs should explain how to keep interactive content from dragging the sheet

未關閉 適合新手
#4,765 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
88/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
markdown
領域
documentation

研究方向

從 docs/api/modal.mdx 中的 Sheet Modal 區段以及 versioned_docs/version-v8/api/modal.mdx 中對應的區段開始。加入提議的 Interactive content 子區段,包括 touchstart 和 mousedown 監聽器,以及關於 pointerdown 和 CSS 方法的說明。當兩個文件版本都說明如何防止互動內容拖曳 sheet 時,即視為完成。

由索引模型根據 Issue 內容生成。

描述

content
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 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

ionic-team/ionic-docs 的其他 Issue

查看 ionic-team/ionic-docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。