Take2 perma comm/mail/components/addrbook/test/browser/browser_edit_photo.js | Uncaught exception in test bound test_local - waiting for photo dialog to change state - timed out after 50 tries.
Categories
(Thunderbird :: Address Book, defect)
Tracking
(thunderbird_esr128 unaffected, thunderbird139 unaffected)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr128 | --- | unaffected |
| thunderbird139 | --- | unaffected |
People
(Reporter: intermittent-bug-filer, Assigned: mkmelin)
References
(Regression)
Details
(Keywords: intermittent-failure, intermittent-testcase, regression, Whiteboard: [stockwell needswork:owner])
Attachments
(1 file, 1 obsolete file)
Filed by: mkmelin [at] iki.fi
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=507563580&repo=comm-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/JyQzg6mTRhKlO0Sv0OBtog/runs/0/artifacts/public/logs/live_backing.log
| Assignee | ||
Comment 1•1 year ago
|
||
Haven't verified but would assume this is a regression from bug 1965052.
| Assignee | ||
Comment 2•1 year ago
|
||
Ah, its working with dom.dialog.light-dismiss.enabled false. So from bug 1964077
I assume this should be working the same way with that enabled as when disabled. (It's just a normal dialog, no closedby set)
Comment 3•1 year ago
|
||
Set release status flags based on info from the regressing bug 1964077
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
|
||
| Comment hidden (Intermittent Failures Robot) |
Comment 6•1 year ago
•
|
||
The other option is to fix the test in https://searchfox.org/comm-central/rev/0db84d7b2365b6eb0ff568ba1404d1bad03845bf/mail/components/addrbook/test/browser/browser_edit_photo.js#566-567, e.g.
let p = waitForDialogOpenState(false);
EventUtils.synthesizeKey("VK_ESCAPE", {}, abWindow);
await p;
Magnus, besides the test failure, is there any other issue if the dialog is closed synchronously on the keydown event?
| Assignee | ||
Comment 7•1 year ago
|
||
It's ultimately not directly a test issue. What it's testing is this:
In Thunderbird address book edit a contact
Click the picture to open image editing dialog
ESC to close this dialog (and it closes)
Since we have ESC set to to close editing, the whole editing session also closes. Previously the ESC to close dialog was not "leaked" outside.
| Comment hidden (Intermittent Failures Robot) |
Comment 9•1 year ago
|
||
Ah, I misunderstood that. Thanks for the clarification!
Comment 10•1 year ago
•
|
||
I worry this might come up again if spec explicitly define the behavior, e.g. dialog should be closed synchronously after keydown event.
How easy would it be for Thunderbird’s address book to address this?
With dom.dialog.light-dismiss.enabled enabled, you can prevent the browser from closing the dialog by adding closedby="none" to the dialog.
With dom.dialog.light-dismiss.enabled disabled closedby="none" doesn't work, but we keep the original behavior that closes dialog asynchronously (bug 1964029), allowing Thunderbird’s address book to handle the event (keypress?) first.
So adding closedby="none" should work for both case now.
Or Thunderbird’s address book can preventDefault the keydown event for ESC which can also prevent us from handing the ESC.
WDYT?
| Assignee | ||
Comment 11•1 year ago
|
||
Well,
- we want ESC to close the dialog
- we want ESC to close the editing (but not when the dialog is open)
I'm not sure that is possible the way things are atm. And I think it should, it doesn't sound like an unusual thing to do.
With dom.dialog.light-dismiss.enabled enabled, if I add closedby="none" ESC doesn't close the dialog. But I also do not get the keypress event in the listener outside the dialog.
Comment 12•1 year ago
|
||
If a listener can be added to the document that calls stopImmediatePropagation() when the dialog is open would that prevent the double closure?
Comment 13•1 year ago
|
||
The thunderbird code seems to rely on non-conforming behaviour, which worked prior (I'm not exactly sure why/how though).
The code relies on a keypress event where event.key == 'Escape'. According to https://w3c.github.io/uievents/#event-type-keypress keypress events should only be dispatched for keys which print a character, or as the spec puts it:
If supported by a user agent, this event MUST be dispatched when a key is pressed down, if and only if that key normally produces a character value.
I think the solution here is for Thunderbird to instead use the keydown event to listen for Esc - while also adding stopPropagation() when the Esc comes from the modal dialog. Native engine code does the same (listens for keydown): https://searchfox.org/mozilla-central/source/layout/base/PresShell.cpp#9087
Updated•1 year ago
|
| Assignee | ||
Comment 14•1 year ago
|
||
Thanks Keith!
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 15•1 year ago
|
||
We were relying on non-conforming behaviour as keypress events should be dispatched only for keys that normally produces a character value - which ESC obviously does not.
Fixes perma comm/mail/components/addrbook/test/browser/browser_edit_photo.js | Uncaught exception in test bound test_local - waiting for photo dialog to change state - timed out after 50 tries.
Comment 16•1 year ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/515784f7097e
Use keydown instead of keypress listener in contact edit form. r=babolivier
| Assignee | ||
Updated•1 year ago
|
| Comment hidden (Intermittent Failures Robot) |
Description
•