Bug 8551 - Can't close Web Admin popups with Escape
Summary: Can't close Web Admin popups with Escape
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Administration (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.19.0
Assignee: Samuel Mannehed
URL:
Keywords: linma_tester, prosaic
Depends on:
Blocks:
 
Reported: 2025-03-21 12:52 CET by Samuel Mannehed
Modified: 2025-03-25 15:54 CET (History)
1 user (show)

See Also:
Acceptance Criteria:
MUST * Popups in Web Admin must be closed when pressing Escape. COULD * The user could be warned when there are unsaved changes.


Attachments

Description Samuel Mannehed cendio 2025-03-21 12:52:01 CET
Popups in Web Admin, such as details for a subcluster, a profile or a session, are currently closed by pressing the 'X' close button in the upper-right corner. 

Users likely expect the Escape key to work here. I have myself given it a number of futile attempts just out of reflex.
Comment 2 Samuel Mannehed cendio 2025-03-21 12:56:21 CET
> MUST
> 
> * Popups in Web Admin must be closed when pressing Escape.

r41606

> COULD
> 
> * The user could be warned when there are unsaved changes.

Not implemented. Pressing Escape is commonly a destructive action and loosing unsaved changes shouldn't be completely unreasonable.
Comment 3 Linn cendio 2025-03-24 17:20:20 CET
Tested on Firefox on Fedora 41 and Esc does not close the popup. Also tested on Chromium, and there Esc closes the popup as expected.

Did not yet test other browsers or dists.
Comment 4 Samuel Mannehed cendio 2025-03-25 12:35:29 CET
(In reply to Linn from comment #3)
> Tested on Firefox on Fedora 41 and Esc does not close the popup. Also tested
> on Chromium, and there Esc closes the popup as expected.
> 
> Did not yet test other browsers or dists.

Works for me both in Firefox 136 and Chrome 134 on Fedora 41, as well as on Firefox 136 on Windows 10.
Comment 5 Linn cendio 2025-03-25 12:39:24 CET
(In reply to Linn from comment #3)
> Tested on Firefox on Fedora 41 and Esc does not close the popup.
My issue was that the cache was still in place, Ctrl + F5 solved it.
Comment 6 Linn cendio 2025-03-25 15:52:26 CET
Tested the following platforms and browsers:

* Linux
  - Chromium 133
  - Firefox 135
* Windows
  - Chromium 135
  - Firefox 136
  - Edge 134
* Mac
  - Safari 18.3

> MUST
> * Popups in Web Admin must be closed when pressing Escape.
Yes, all browsers listed above close the popup when Esc is pressed. Also tested that other random buttons do not close the popup, and that clicking the "X" still closes the popup.

Out of curiousity, I also tested this code on Android ___ for Chrome, Firefox and Edge. The popups in those browsers do not react to Esc. However, seeing that physical keyboards for android are quite uncommon, I believe it's ok that this fix only works for desktop browsers.

> COULD
> * The user could be warned when there are unsaved changes.
As previously mentioned, this criterion was not implemented.

Also looked through the code changes, was a nice and small diff.
Comment 7 Linn cendio 2025-03-25 15:54:44 CET
(In reply to Linn from comment #6)
> ...
> Out of curiousity, I also tested this code on Android ___ ...
The version I tested was Android 13.

Note You need to log in before you can comment on or make changes to this bug.