Dim: "esc" hotkey no longer clears search

Created on 31 May 2019  路  6Comments  路  Source: DestinyItemManager/DIM

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).

Bug

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+f shortcut for clearing search.

All 6 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kyleshay picture kyleshay  路  7Comments

joshminnie picture joshminnie  路  4Comments

bhollis picture bhollis  路  3Comments

bhollis picture bhollis  路  6Comments

cbcrouse picture cbcrouse  路  4Comments