Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#4,765 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
markdown
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với phần Sheet Modal trong docs/api/modal.mdx và phần tương ứng trong versioned_docs/version-v8/api/modal.mdx. Thêm tiểu mục Interactive content được đề xuất, bao gồm các listener touchstart và mousedown cùng các ghi chú về pointerdown và các cách tiếp cận bằng CSS. Hoàn thành khi cả hai phiên bản tài liệu đều giải thích cách ngăn nội dung tương tác kéo sheet.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
MDX
Star
621
Fork
3.2k
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
65

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ionic-team/ionic-docs

Tất cả issue của ionic-team/ionic-docs

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.