diff --git a/GTG/gtk/browser/sidebar.py b/GTG/gtk/browser/sidebar.py index 656766c51..65793dd02 100644 --- a/GTG/gtk/browser/sidebar.py +++ b/GTG/gtk/browser/sidebar.py @@ -74,6 +74,12 @@ def __init__(self, app, ds: Datastore, browser): wrap_box.set_vexpand(True) wrap_box.set_hexpand(True) + # Create an invisible dummy button to catch focus in some edge cases + self.dummy = Gtk.Button() + self.dummy.set_size_request(0, 0) + self.dummy.add_css_class('dummy') + wrap_box.append(self.dummy) + # ------------------------------------------------------------------------------- # General Filters # ------------------------------------------------------------------------------- diff --git a/GTG/gtk/data/style.css b/GTG/gtk/data/style.css index 2d3f1b698..45529fad2 100644 --- a/GTG/gtk/data/style.css +++ b/GTG/gtk/data/style.css @@ -10,6 +10,16 @@ border-top: 1px solid rgb(213, 208, 204); } +.dummy { + background: transparent; + border: none; + color: transparent; + font-size: 0.001px; + margin: -100px; + opacity: 0; + padding: 0; +} + /* We have to get move the padding into the boxes so the background color of the rows reaches all