Only update stylesheet if we actually had a search
We call search.clear() a lot, even before the stylesheet JS was initialized. After we've done a search, we can be sure that it is inited, and we only need to hide the scrollbar there.
This commit is contained in:
parent
10646cf9b8
commit
19589c93b5
@ -215,9 +215,10 @@ class WebEngineSearch(browsertab.AbstractSearch):
|
||||
self._find(text, self._flags, result_cb, 'search')
|
||||
|
||||
def clear(self):
|
||||
if self.search_displayed:
|
||||
self._tab.scripts.update_stylesheet(searching=False)
|
||||
self.search_displayed = False
|
||||
self._widget.findText('')
|
||||
self._tab.scripts.update_stylesheet(searching=False)
|
||||
|
||||
def prev_result(self, *, result_cb=None):
|
||||
# The int() here makes sure we get a copy of the flags.
|
||||
|
Loading…
Reference in New Issue
Block a user