Help dialog (via '?') still lists esc as "clear search or dismiss dialog." But pressing esc no longer seems to clear the current search. Not sure if this is an intended change and help text is just out of date, or if this is a recent-ish bug with esc? For now, can mostly work around by using shift+f which starts a new search (and clears the old one as a side-effect).
thanks @javalasers!
related to: https://github.com/DestinyItemManager/DIM/pull/3834
caused by: https://github.com/DestinyItemManager/DIM/blob/master/src/app/hotkeys/hotkeys.ts#L63-L65
possibly fixed by creating a mousetrap for the dialog: https://craig.is/killing/mice#wrapping
Yeah, unfortunately the mousetrap focus trapping is a bit tough, since it requires that the element have focus, which our dialogs don't quite do. I'll have to think about how to do this - I had forgotten that we already had a global escape handler.
Hah, actually looking at it now, it looks like allowing escape to clear the search in the first place was a bug I introduced when I rewrote the hotkey handling. It was supposed to only work when the search input had focus.
I might just update the text and reserve this for clearing dialogs, and leave the shift+f shortcut for clearing search.
That sounds good! If anything else, maybe if the search bar is focused we could prioritize clearing the input when ESC is pressed? If it gets to be too fussy thats no problem. shift+f is :+1:
Not if focused... 馃槂
@bhollis I know when testing my change for restoring the item dialog close that the search could not be cleared even with the search having focus. I was going to mention in my PR I noticed it wasn't working but did not and never got around to opening the issue that it seemed broken so I could fix.
Sounds like no fix is needed.
Most helpful comment
Hah, actually looking at it now, it looks like allowing escape to clear the search in the first place was a bug I introduced when I rewrote the hotkey handling. It was supposed to only work when the search input had focus.
I might just update the text and reserve this for clearing dialogs, and leave the
shift+fshortcut for clearing search.