PageVeilBehavior: a click on a button that leaves a field updating on change is lost
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 56/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- java, javascript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Java
- Estrellas
- 800
- Forks
- 437
- Merge medio
- 21 h 36 min
- PR fusionados (30 d)
- 167
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/wicket
-
PropertyResolver fails on JDK classes with a non-public field named like the propertyPosiblemente ocupada @vaibhavgupta443 la tomó hoy. Abiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
apache/wicket#1991 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Stop the autocomplete from accumulating request parameters while typingPosiblemente ocupada @aryankalantri la tomó hoy. Abiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
apache/wicket#1947 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Validate the report-uri value given to CSPHeaderConfiguration#reportBackPosiblemente ocupada @AzizOuertani la tomó hace 3 días. Abiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
apache/wicket#1946 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/wicket
Issues similares
-
Quick Installation step 2 installs from the plugin manager, but the plugin isn't published yetAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
jenkinsci/user-guide-ai-chatbot-plugin#132 ·
Los mantenedores suelen responder en 6 días
-
account assessment course feature lecture
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
[Bug] 连接达梦时报错,agent 进程启动即退Abiertobug db/dameng user-priority/P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
t8y2/dbx#15534 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
app:learninggoalhub enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100