state/editing? outlives the editor's textarea
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Refactorización
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Área
- backend
Línea de trabajo
Read the :editor/editing? state and state/get-input callers, then trace the editor component lifecycle and the shortcut and CodeMirror paths described in the issue. Compare the two proposed meanings of editing? and identify which callers need each; done means maintainers have chosen a consistent state contract that prevents stale textarea access.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
state/editing? outlives the editor's textarea
state/editing? (:editor/editing?) can stay true for a moment after the block editor's textarea has left the DOM: the block was just deleted, the editor closed, a re-render replaced it. In that window state/get-input returns nil while everything that asks editing? still treats the user as editing. Code that trusts editing? and then reads the textarea throws.
A local key fuzzer that records uncaught page errors found this through several entry points:
- block-editing shortcuts (Alt+E, Alt+A, Alt+U, Alt+K, the word movement and word delete shortcuts): fixed for the whole shortcut group in #13865 by requiring a live input in the group's gate;
- Up/Down at the edge of a code block (CodeMirror's own key handler, outside the shortcut gate):
get-prev-block-non-collapsedgot a nil block (also in #13865); - earlier, cursor helpers and paste handlers reached through other paths.
#13865 removes the crashes but leaves the state as it is: any new code that checks editing? and reads the textarea can hit the same thing.
The design question
Should editing? mean "a block editor textarea is mounted"? Options:
- clear
:editor/editing?when the editor component that set it unmounts without another taking over (care is needed for re-renders that unmount and remount the same editor); - or define
editing?as(some? (get-input))for callers that act on the textarea, and keep the current flag for callers that only need "a block is being edited".
This touches editing state everywhere, so it is a question for the maintainers rather than a patch.
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 29
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
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 logseq/db-test
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolvedPosiblemente ocupada @RaphaelFakhri la tomó hace 20 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
`#Asset` label is not displayed on asset nodes when `Hide from Node` is disabledPosiblemente ocupada @tiensonqin la tomó hace 23 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Todos los issues de logseq/db-test
Issues similares
-
enhancement triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ShaftHQ/SHAFT_ENGINE#7901 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ClickHouse/clickhouse-js#1130 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
DOI-USGS/pywatershed#428 ·
-
web_to_md writes image links with a backslash on Windows, so import-sources can't rename themAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
hugohe3/ppt-master#348 ·
Los mantenedores suelen responder en 1 día
-
bug claude Minor static-analysis
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
linagora/cozy-flagship-app#1358 ·