mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-18 11:31:26 -03:00
fix(ui): stop media viewer Escape from closing underlying modal
This commit is contained in:
@@ -134,6 +134,10 @@ export function openMediaViewer(arg1, arg2, arg3) {
|
||||
|
||||
const keyHandler = (e) => {
|
||||
if (e.key === 'Escape') {
|
||||
// Stop propagation so bubble-phase handlers (e.g. ModalManager's
|
||||
// Escape handler) do not also close the modal underneath.
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
closeMediaViewer();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user