shell: handle CTRL+BACKSPACE to clear filter (#6307)
* emoji panel: handle CTRL+BACKSPACE to clear filter * shell: handle CTRL+BACKSPACE to clear filter in all search overlays * Indentation fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * menu filters: align keyboard editing with Qt standard shortcuts * menu filters: extract shared filter-editing helpers * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * potential fix for pull request findings * Only treat filter edit keys as edits when they change the text Backspace/Ctrl+U on an empty filter no longer calls setFilter(""), which was resetting the list selection back to the top. This also lets the menu's empty-filter Backspace fall through to goBack() with any modifier held, as it did before the Util extraction. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: David Heinemeier Hansson <david@hey.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
Copilot Autofix powered by AI
David Heinemeier Hansson
parent
ddab62ea0d
commit
7721228319
@@ -837,9 +837,11 @@ Item {
|
||||
if (root.filterText) root.setFilter("")
|
||||
else root.cancel()
|
||||
event.accepted = true
|
||||
} else if (event.key === Qt.Key_Backspace) {
|
||||
if (root.filterText.length > 0) root.setFilter(root.filterText.slice(0, -1))
|
||||
else root.goBack()
|
||||
} else if (Util.editsFilter(event, root.filterText)) {
|
||||
root.setFilter(Util.editedFilter(event, root.filterText))
|
||||
event.accepted = true
|
||||
} else if (event.key === Qt.Key_Backspace && !root.filterText) {
|
||||
root.goBack()
|
||||
event.accepted = true
|
||||
} else if (event.key === Qt.Key_Up) {
|
||||
root.select(-1)
|
||||
|
||||
Reference in New Issue
Block a user