From a5db80bb557d858b9de51acfa60aa189b5305a8e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 2 Nov 2020 11:44:27 +0530 Subject: [PATCH] Viewer: back and forward buttons on the mouse now trigger the back and forward actions --- src/pyj/read_book/iframe.pyj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pyj/read_book/iframe.pyj b/src/pyj/read_book/iframe.pyj index 6819e1b0d9..3774e2ce7b 100644 --- a/src/pyj/read_book/iframe.pyj +++ b/src/pyj/read_book/iframe.pyj @@ -611,6 +611,8 @@ class IframeBoss: drag_mouse_position.x = drag_mouse_position.y = None # ensure selection bar is updated self.onselectionchange() + if evt.button is 3 or evt.button is 4: + self.send_message('handle_shortcut', name='back' if evt.button is 3 else 'forward') def ondoubleclick(self, evt): self.send_message('annotations', type='double-click')