Skip to content

Commit

Permalink
fix: should skip tab and space for fast search
Browse files Browse the repository at this point in the history
Tab 与 Space 不应当触发快速搜索。

Log:
  • Loading branch information
BLumia committed Jan 31, 2024
1 parent 2723108 commit a3989cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qml/FullscreenFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ Control {
}

Keys.onPressed: {
if (searchEdit.focus === false && !searchEdit.text && event.text) {
if (searchEdit.focus === false && !searchEdit.text && (event.text && !"\t ".includes(event.text))) {
searchEdit.focus = true
searchEdit.text = event.text
}
Expand Down
2 changes: 1 addition & 1 deletion qml/WindowedFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ StackView {
}
}
Keys.onPressed: {
if (stackView.index !== 0 ) {
if ((event.text && !"\t ".includes(event.text)) && (stackView.currentItem !== stackView.initialItem)) {
stackView.pop()
}
if (searchEdit.focus === false && !searchEdit.text && event.text) {
Expand Down

0 comments on commit a3989cd

Please sign in to comment.