AzureStorageExplorer
AzureStorageExplorer copied to clipboard
The escape key to exit an editable field but ended up cancelling an upload
Storage Explorer Version: 1.7.0 Platform/OS: All Architecture: All Regression From: No
Bug description When performing an upload, if you have the "file picker" window open, if you then press escape both the "file picker" window and the upload dialog are closed. We should only close the file picker.
I've investigated and this only repros on Windows. The cause of the bug also appears to be internal to Electron, I've opened an issue here: https://github.com/electron/electron/issues/19087
Annnnd they closed that bug. Opened one against Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=980751
Kicking this issue down to road. Will check on it later to see progress...
Still an active bug. Kicking down the down the road again.
Still an active bug. Kicking down the down the road again. 😔
Electron issue is now closed. Let's confirm that this is now fixed.
@v-xianya Please verify if this is resolved.
Hi @craxal Verified this issue both on the latest main build and rel build. it reproduces. Here is the record:
The underlying Chromium bug is still open (although it hasn't gotten attention for several years).
There's a subtlety I noticed. We listen for the keyup event when determining whether to close the dialog window. This has interesting implications, because system dialogs close when they get the keydown event. So, here's what happens when the Escape key is pressed:
- The user presses Escape.
- The system dialog gets the
keydownevent and closes. - Focus transfers to the Storage Explorer dialog window.
- The user releases the Escape key.
- The Storage Explorer dialog gets the
keyupevent and closes.
This is easily rectified by changing to the keydown event for Storage Explorer dialog windows. Not only does this fix the problem, but if we ignore repeat events, it also simplies how we handle Escape for closing popup windows for select and datetime-local elements.