Selection toolbar does not follow scrolling inside the WYSIWYG editor
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Start by reproducing the issue in the Playground using WYSIWYG mode and the .g-md-wysiwyg-editor__editor scroll container described in the steps. Trace how the selection toolbar tracks the selected text while the editor scrolls, comparing that behavior with page scrolling. Done when the toolbar follows the selection during editor scrolling without breaking the page-scroll behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
On main, the selection formatting toolbar stays at its old position when scrolling inside the WYSIWYG editor. Scrolling the page moves the toolbar correctly.
Environment
- Branch:
main, commit b6334207f0eca9f565aecce987cf6bd1cbe0fd36. - Editor:
15.50.0; UIkit:7.39.0, using the committed lockfile. - Chromium
152.0.7977.169on macOS; viewport:1100 × 560CSS pixels. - Clean checkout; no editor source changes.
Steps to reproduce
- Install dependencies and start the demo:
pnpm install --frozen-lockfile pnpm exec nx build-deps @markdown-editor/demo pnpm start - Open Playground in WYSIWYG mode and replace the content with 30 paragraphs of plain text. The recording uses numbered copies of:
Paragraph 01. Select this sentence to open the formatting toolbar, then scroll inside the editor.
- In the story frame's DevTools console, limit the editor's scroll container:
document.querySelector('.g-md-wysiwyg-editor__editor').style.maxHeight = '300px'; - Double-click a word in paragraph 5 to open the selection toolbar.
- Keep the pointer over the editor and scroll down by approximately 100 px with the mouse wheel or trackpad.
Expected
The selection toolbar follows the selected text as the editor scrolls.
Actual
The selected text moves up, while the toolbar stays at its original screen position.
The reproduction used browser wheel input. Measurements are in CSS pixels:
| State | Editor scroll | Page scroll | Selection top | Toolbar top |
|---|---|---|---|---|
| Before scrolling | 0 | 0 | 340 | 362.5 |
| After editor scrolling | 100 | 0 | 240 | 362.5 |
| Page-scroll control, editor reset | 0 | 100 | 240 | 262.5 |
Recording
Recorded on the main checkout above. The video scrolls the editor down, returns it to the top, then scrolls the page.
https://github.com/user-attachments/assets/213dd821-8428-428c-af2f-84f721d58eb9
Screenshots
Before scrolling: the toolbar is directly below the selected word.
Editor scrolled by 100 px: the selection moved up; the toolbar stayed in place.
Page-scroll control: after resetting the editor scroll, scrolling the page by 100 px moves both the selection and toolbar together.
- Ngôn ngữ chính
- TypeScript
- Star
- 428
- Fork
- 48
- Merge trung bình
- 5 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 47
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của gravity-ui/markdown-editor
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
gravity-ui/markdown-editor#1452 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
gravity-ui/markdown-editor#1293 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Markup mode: `colorify` does not detect existing `{color}(...)` wrapper when switching colorsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
gravity-ui/markdown-editor#1129 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
gravity-ui/markdown-editor#1331 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Shared `slotsTokenizer` for directive blocksCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
gravity-ui/markdown-editor#1301 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của gravity-ui/markdown-editor
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
software-mansion/argent#1946 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
podman-desktop/podman-desktop#20216 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Type] Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
WordPress/ai#1386 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
omdsh-dev/DSH-better-sidebar#1205 ·
Maintainer thường phản hồi trong vòng 3 ngày