Selection toolbar does not follow scrolling inside the WYSIWYG editor
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 428
- Forks
- 48
- Merge medio
- 5 d 15 h
- PR fusionados (30 d)
- 47
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de gravity-ui/markdown-editor
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
gravity-ui/markdown-editor#1452 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
gravity-ui/markdown-editor#1293 ·
Los mantenedores suelen responder en 1 día
-
Markup mode: `colorify` does not detect existing `{color}(...)` wrapper when switching colorsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
gravity-ui/markdown-editor#1129 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
gravity-ui/markdown-editor#1331 ·
Los mantenedores suelen responder en 1 día
-
Shared `slotsTokenizer` for directive blocksPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
gravity-ui/markdown-editor#1301 ·
Los mantenedores suelen responder en 1 día
Todos los issues de gravity-ui/markdown-editor
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
software-mansion/argent#1946 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
podman-desktop/podman-desktop#20216 ·
Los mantenedores suelen responder en 1 día
-
[Type] Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
WordPress/ai#1386 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 5 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
omdsh-dev/DSH-better-sidebar#1205 ·
Los mantenedores suelen responder en 3 días