PageVeilBehavior: a click on a button that leaves a field updating on change is lost
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 56/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- java, javascript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Java
- スター
- 800
- フォーク
- 437
- 平均マージ
- 21時間 36分
- マージ済み PR(30日)
- 167
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/wicket のほかの issue
-
PropertyResolver fails on JDK classes with a non-public field named like the property対応中かも @vaibhavgupta443 が今日担当しました。 オープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
apache/wicket#1991 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Stop the autocomplete from accumulating request parameters while typing対応中かも @aryankalantri が今日担当しました。 オープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
apache/wicket#1947 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Validate the report-uri value given to CSPHeaderConfiguration#reportBack対応中かも @AzizOuertani が 3 日前に担当しました。 オープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
apache/wicket#1946 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
jenkinsci/user-guide-ai-chatbot-plugin#132 ·
メンテナーはふだん 6 日以内に返信
-
account assessment course feature lecture
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
bug db/dameng user-priority/P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
app:learninggoalhub enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100