Fix updating of scroll position with gg/G/etc.

This commit is contained in:
Florian Bruhin 2014-12-14 16:44:18 +01:00
parent b7dc2e1bc6
commit ba9bb0e418

View File

@ -406,6 +406,11 @@ class WebView(QWebView):
If necessary, we emit scroll_pos_changed so the statusbar percentage
updates.
"""
QTimer.singleShot(0, self.update_scroll_perc)
@pyqtSlot()
def update_scroll_perc(self):
"""Update the scroll position after on_scroll_requested."""
frame = self.page().mainFrame()
new_pos = (frame.scrollBarValue(Qt.Horizontal),
frame.scrollBarValue(Qt.Vertical))