The selectmenuselect event erroneously fires, despite not making a selection
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, jquery
- Ambito
- frontend
Direzione di ricerca
Riproduci l’evento utilizzando il jsbin o jsfiddle collegato, incluso il passaggio del cursore sulle opzioni prima di fare clic al di fuori del menu a discesa, e confronta il comportamento con il ticket storico. Traccia il punto di ingresso dell’evento selectmenuselect e aggiungi una copertura di regressione che dimostri che la chiusura senza una selezione non lo attiva; verifica che le selezioni effettive continuino ad attivarlo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This is the same exact bug from 2017 which was filed at https://bugs.jqueryui.com/ticket/15115/#comment:1
The comment is more accurate than the OP's post.
The OP gives an example at http://jsbin.com/cubulifice/edit?html,js,console,output
If you open the dropdown menu, then click outside of the dropdown to close it, and rinse and repeat a few times - the event fires, even though nothing was selected.
This can be fixed by inserting this code after function() { :
if($('#speed-menu .ui-menu-item').is(':hidden')) {
console.log('Ignoring erroneous selection');
return;
}
Similarly, here is my own example: https://jsfiddle.net/eucq05ok/
In my own tests, it is easier to reproduce the bug if you hover over some of the options before clicking outside of the dropdown.
This can be fixed by inserting the same code, but changing #speed-menu to #area-menu.
I observed this bug on the latest version of jQuery (3.7.1) and the latest version of jQuery UI (1.14.1).
- Lingua principale
- JavaScript
- Stelle
- 11.3k
- Fork
- 5.2k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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.
Altre issue di jquery/jquery-ui
-
Selectmenu changes selection after its native select is disabled while openForse già presa @Xapollon430 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Datepicker changes a natively disabled input if its calendar is openForse già presa @Xapollon430 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
-
Behavior shared with 1.12 Comp: Datepicker
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Comp: Datepicker Needs info
Difficoltà 3/5 1-2 giorni Idoneità per principianti 53/100
-
CSS variable stripped from calls to jQuery .css()Forse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaComp: Effects
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
Tutte le issue di jquery/jquery-ui
Issue simili
-
good first issue tests
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
growilabs/growi#12246 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
TMHSDigital/Free-Game-Dev-Assets#301 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue severity: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TMHSDigital/Static_Chess#53 ·