diff options
author | Christian Dywan <christian@twotoasts.de> | 2019-03-10 20:23:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-10 20:23:52 +0100 |
commit | 5e01bfcc3d4ffe58a0d835ed1ec8e140b7b8a9e0 (patch) | |
tree | cdb8dc5f653d595be97e8198ea7201af9d5a1503 | |
parent | 501340375838c8dee8a9e654a380a8ff045b9165 (diff) | |
download | midori-git-5e01bfcc3d4ffe58a0d835ed1ec8e140b7b8a9e0.tar.gz |
Show/ hide search bar when switching tabs (#293)
The find controller tracks state per web view.
-rw-r--r-- | core/browser.vala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/browser.vala b/core/browser.vala index b2b4361f..40bbf781 100644 --- a/core/browser.vala +++ b/core/browser.vala @@ -309,6 +309,9 @@ namespace Midori { focus_timeout = Timeout.add (500, () => { focus_timeout = 0; tab.grab_focus (); + search_entry.text = tab.get_find_controller ().get_search_text () ?? ""; + search.visible = search_entry.text != ""; + search.search_mode_enabled = search.visible; goto_activated (); return Source.REMOVE; }, Priority.LOW); |