Commit b0677dd4 authored by Nate Graham's avatar Nate Graham

Merge branch 'refine-searchfield-close-behavior' into 'master'

Refine search/filter field close behavior

This MR resolves two bugs with regards to the behavior of hiding the search/filter field and its toolbar:
- Hitting the escape key does not close it when it has focus. Fixed now.
- When it's closed, it retains focus even though it's hidden. Now focus jumps to the main content view, since that's probably what the user wants to interact with next.

See merge request !57
parents bda62357 7182cfd1
......@@ -247,6 +247,8 @@ ColumnLayout {
Accessible.role: Accessible.EditableText
placeholderText: i18n("Search for album name, artist, etc.")
Keys.onEscapePressed: persistentSettings.expandedFilterView = false;
},
Item {
width: elisaTheme.layoutHorizontalMargin
......@@ -278,6 +280,11 @@ ColumnLayout {
target: filterRow
opacity: 0.0
}
StateChangeScript {
// Focus main content view since that's probably what the user
// wants to interact with next
script: contentDirectoryView.forceActiveFocus();
}
},
State {
name: 'expanded'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment