Remove enableUserSelectHack, set to false by default

Abierto
#709 1 comentario 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
javascript
Área
frontend

Línea de trabajo

Start with lib/DraggableCore.js around line 97 and lib/utils/domFns.js around line 168 to understand how enableUserSelectHack is defined and consumed. Done means the hack is removed or defaults to false without clearing the user's document selection; verify the Gmail compose reproduction described in the issue.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Rant: We had an incredibly difficult time connecting the dots between a setState causing a modal to hide and figuring out why the user was losing focus in Gmail. I've probably spent 10+ hours digging through our codebase since we have a ton of places where we manage the user's selection. The last thing I expected was for the Draggable wrapper on that modal to be removing all ranges from the document. I had to resort to a binary search "comment half of everything out, see if it still works, repeat" which was still extremely difficult because I didn't consider the very last element to be the one causing issues.

Repro: The user selects text in any Gmail compose window, opens formatting, clicks bold, our modal disappears (from something like document.addEventListener('mousedown', checkIsOutsideAndHideModal), and the user loses their selection and bold is not applied

RCA:
https://github.com/react-grid-layout/react-draggable/blob/master/lib/DraggableCore.js#L97
This comment explains why it exists, but the code that consumes this flag is mostly about removing document ranges
https://github.com/react-grid-layout/react-draggable/blob/master/lib/utils/domFns.js#L168

Lenguaje dominante
JavaScript
Estrellas
9.3k
Forks
1k
Merge medio
3 d 8 h
PR fusionados (30 d)
4

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de react-grid-layout/react-draggable

Todos los issues de react-grid-layout/react-draggable

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.