Click events stop firing after slow "double" click (when using beforehover event handler)
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
Hello,
I'm using the plotly_click and plotly_beforehover events to get the hover label to persist when someone clicks on a data point.
The idea is that after someone clicks a store a reference to the point they've clicked on. Then in the before hover event, if that reference is populated I cancel the hover event.
(I'm doing more than this in the actual code, but this represents the problem).
If you click quite fast, not fast enough to register as a double click, but pretty quickly, as you move the mouse around. Then sometimes that causes the click events to stop being fired.
This seems to happen when there is a point that should have a persistent hover. The hover gets turned off but then no other hovers are displayed. The reference is populated but the user can't click to turn it off. So you get stuck with no hover labels showing up.
Here's a demo: https://jsfiddle.net/mdt6rqck/
It feels like the quick clicking causes some kind of hover state to get stuck? So now the click events can't get through?
Guida per i contributori
Apri la guida per i contributori
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.
Direzione di ricerca
Riproduci il comportamento di hover bloccato usando il JSFiddle collegato, concentrandoti sui clic rapidi che sono più lenti di un doppio clic e sugli handler plotly_click e plotly_beforehover. Traccia i punti di ingresso degli eventi di hover e clic per identificare il motivo per cui i clic successivi vengono soppressi; il lavoro è completato quando è possibile cancellare le etichette di hover persistenti e i clic successivi continuano ad attivarsi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100