Escape from built-in editor closes uploader window
Describe the bug
The escape key closes both the built-in editor and the uploader modals.
To Reproduce
- Upload a file, and you see the list of uploaded files.
- Click the edit icon to edit an image.
- Hit the Escape key.
This seems to close both the editor and the uploader modals.
Expected behavior
I think it should close just the editor modal and leave you on the uploader.
Desktop (please complete the following information):
- OS: Windows
- Browser Chrome
- Version 123
Smartphone (please complete the following information):
Not tested.
Additional context
We faced a similar issue in our project code. We found that a DOM event sent from the Uploadcare library was being handled by the web component and other components listening to the event.
Try using e.preventDefault() for the close event to see if you can isolate the DOM event and prevent it from propagating to the upper component.