diff options
| author | Ismael Asensio <[email protected]> | 2020-07-04 15:42:55 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2020-07-05 17:14:19 +0000 |
| commit | ec03435022efa72a428a43eb106eaf31f503a9e6 (patch) | |
| tree | f133ebf298af12afdf61741935d06b26b136e647 /src/search/dolphinsearchbox.cpp | |
| parent | 275d7b537de4bf6db971c9cb1d591ffe512272f9 (diff) | |
[search] Do not update text input when it has focus
When the user is entering a search term, a delayed search will be
emmited after a few seconds. This means updating the search URL, which
in turn gets parsed and reflected back on the search input.
To avoid interrupting the user input flow and unexpectedly move the
cursor to the end, let's update the input search box only when it
doesn't have the focus.
It's still updated on other interactions such as changing the search
options or clicking a saved search on the places panel.
BUG: 423328
FIXED-IN: 20.08
Diffstat (limited to 'src/search/dolphinsearchbox.cpp')
| -rw-r--r-- | src/search/dolphinsearchbox.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 239280280..20a527ff4 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -520,7 +520,10 @@ void DolphinSearchBox::updateFromQuery(const DolphinQuery& query) setSearchPath(QUrl::fromLocalFile(QDir::homePath())); } - setText(query.text()); + // If the input box has focus, do not update to avoid messing with user typing + if (!m_searchInput->hasFocus()) { + setText(query.text()); + } if (query.hasContentSearch()) { m_contentButton->setChecked(true); |
