From 0005c1d0a78bda923fdc2a44272a43a993c10225 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 5 Feb 2014 15:59:54 +0100 Subject: [PATCH] Fix browser eventFilter/scroll hack --- qutebrowser/widgets/browser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qutebrowser/widgets/browser.py b/qutebrowser/widgets/browser.py index abdfcfa2d..362e1ef34 100644 --- a/qutebrowser/widgets/browser.py +++ b/qutebrowser/widgets/browser.py @@ -428,6 +428,7 @@ class BrowserTab(QWebView): new_pos = (frame.scrollBarValue(Qt.Horizontal), frame.scrollBarValue(Qt.Vertical)) if self._scroll_pos != new_pos: + self._scroll_pos = new_pos logging.debug("Updating scroll position") frame = self.page().mainFrame() m = (frame.scrollBarMaximum(Qt.Horizontal), @@ -435,6 +436,8 @@ class BrowserTab(QWebView): perc = (round(100 * new_pos[0] / m[0]) if m[0] != 0 else 0, round(100 * new_pos[1] / m[1]) if m[1] != 0 else 0) self.scroll_pos_changed.emit(*perc) + # we're not actually filtering something, let superclass handle the + # event return super().eventFilter(watched, e) def event(self, e):