PageVeilBehavior: a click on a button that leaves a field updating on change is lost
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 56/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- java, javascript
Direzione di ricerca
Start with wicket-veil.js and the /ajax/call/beforeSend veil handling described in the issue. Trace how pointer events interact with the veil and how the script identifies elements after an Ajax response replaces them. Done means the described button click runs once, while the listed detached, hidden, disabled, and intervening-press cases are skipped.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Affects: 11.0.0 and current master
Component: wicket-extensions, PageVeilBehavior, wicket-veil.js
What happens
A page with PageVeilBehavior, a field that updates the server on change, and a button:
add(new PageVeilBehavior());
field.add(new AjaxFormComponentUpdatingBehavior("change") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
Thread.sleep(1000); // a round trip longer than a click
}
});
form.add(new AjaxButton("save") {
@Override
protected void onSubmit(AjaxRequestTarget target) {
runs.incrementAndGet();
}
});
Type something in the field, then click Save once with the mouse. The field's request is sent, but Save never runs: runs stays 0. Without PageVeilBehavior, Save runs once.
Checked with a real mouse click through WebDriver in Chrome 155 and Firefox 124.
Cause
- The press on Save moves the focus, so the field fires
changewithin themousedown. - The channel is free, so Wicket sends the request at once, and the veil is appended to
bodyin/ajax/call/beforeSend, before the mouse comes up. - The
mouseuplands on the veil. The browser firesclickon the nearest common ancestor of themousedownandmouseuptargets, herebody, not on the button.
The user sees the field saved and Save doing nothing. This happens whenever the field's round trip lasts longer than the press, and every form with an updating field is open to it.
Fix proposed
In wicket-veil.js:
- Remember the element of a
pointerdownmade while no veil covered it. - If the matching
pointeruplands on a veil, callclick()on that element once the veil is lowered. - Skip the replay if the element is no longer in the page, is hidden or disabled, or if a new press started meanwhile. If the answer replaced the element, replay on the element now carrying the same id.
Workaround
None short of patching the veil's script: the click is never fired, so the application has nothing to listen to.
Related: #1631, #1942. Found while working on reiern70/advanced-widgets#141.
- Lingua principale
- Java
- Stelle
- 800
- Fork
- 437
- Merge medio
- 21h 36m
- PR unite (30g)
- 167
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 apache/wicket
-
PropertyResolver fails on JDK classes with a non-public field named like the propertyForse già presa @vaibhavgupta443 l’ha presa oggi. Apertagood first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
apache/wicket#1991 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Stop the autocomplete from accumulating request parameters while typingForse già presa @aryankalantri l’ha presa oggi. Apertagood first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
apache/wicket#1947 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Validate the report-uri value given to CSPHeaderConfiguration#reportBackForse già presa @AzizOuertani l’ha presa 3 giorni fa. Apertagood first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
apache/wicket#1946 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/wicket
Issue simili
-
account assessment course feature lecture
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
app:learninggoalhub enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100