Jittery movement when draggable uses nodeRef, smooth movement when using handle
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react
- Ambito
- frontend
Direzione di ricerca
Start with the nodeRef example in the README and reproduce the jitter by wrapping the referenced header in a div. Compare that behavior with the handle approach, then verify that dragging remains smooth with the wrapper and nodeRef while avoiding the findDOMNode warning.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Looks like nodeRef causes jittery movement when the handle is not a direct ancestor. For example, using the nodeRef example from the README and adding a div wrapping the target causes this issue.
We're updating draggable modal windows to use nodeRef props to avoid the console warning about findDOMNode being deprecated. Previously, we had handle set to a DOM class name and that exact class name assigned to an element inside the element.
<Draggable nodeRef={dragRef}>
<div>
<header className={clsx(styles.header, styles[uiVariant])} ref={dragRef}>/* content */</header>
</div>
</Draggable>
With the handle approach, the movement when dragging and item was smooth and we had no issues. With the nodeRef, it's incredibly jittery. We normally have bounds and onDragStart methods but I removed those for testing and the jitter persists.
- Lingua principale
- JavaScript
- Stelle
- 9.3k
- Fork
- 1k
- Merge medio
- 3g 8h
- PR unite (30g)
- 4
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di react-grid-layout/react-draggable
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
react-grid-layout/react-draggable#784 · 4 commenti · 2 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
react-grid-layout/react-draggable#782 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
react-grid-layout/react-draggable#781 · 1 commento · 2 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
react-grid-layout/react-draggable#780 · 8 commenti ·
Tutte le issue di react-grid-layout/react-draggable
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Daemon passes --experimental-wasm-jspi unconditionally on Node >= 24; Node 26 rejects the flag Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Automattic/studio#4908 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
sugarlabs/musicblocks#8847 ·