AzureStorageExplorer icon indicating copy to clipboard operation
AzureStorageExplorer copied to clipboard

The escape key to exit an editable field but ended up cancelling an upload

Open jinglouMSFT opened this issue 6 years ago • 9 comments
trafficstars

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.

jinglouMSFT avatar Mar 02 '19 00:03 jinglouMSFT

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

MRayermannMSFT avatar Jul 02 '19 22:07 MRayermannMSFT

Annnnd they closed that bug. Opened one against Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=980751

MRayermannMSFT avatar Jul 02 '19 22:07 MRayermannMSFT

Kicking this issue down to road. Will check on it later to see progress...

MRayermannMSFT avatar Jul 16 '19 18:07 MRayermannMSFT

Still an active bug. Kicking down the down the road again.

MRayermannMSFT avatar Jan 14 '20 22:01 MRayermannMSFT

Still an active bug. Kicking down the down the road again. 😔

MRayermannMSFT avatar Jun 19 '20 17:06 MRayermannMSFT

Electron issue is now closed. Let's confirm that this is now fixed.

craxal avatar Mar 05 '25 18:03 craxal

@v-xianya Please verify if this is resolved.

craxal avatar Mar 20 '25 23:03 craxal

Hi @craxal Verified this issue both on the latest main build and rel build. it reproduces. Here is the record:

Image

v-xianya avatar Mar 21 '25 02:03 v-xianya

The underlying Chromium bug is still open (although it hasn't gotten attention for several years).

craxal avatar Jun 06 '25 23:06 craxal

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:

  1. The user presses Escape.
  2. The system dialog gets the keydown event and closes.
  3. Focus transfers to the Storage Explorer dialog window.
  4. The user releases the Escape key.
  5. The Storage Explorer dialog gets the keyup event 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.

craxal avatar Nov 12 '25 00:11 craxal