Viewer: back and forward buttons on the mouse now trigger the back and forward actions

This commit is contained in:
Kovid Goyal 2020-11-02 11:44:27 +05:30
parent 826295a229
commit a5db80bb55
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -611,6 +611,8 @@ class IframeBoss:
drag_mouse_position.x = drag_mouse_position.y = None drag_mouse_position.x = drag_mouse_position.y = None
# ensure selection bar is updated # ensure selection bar is updated
self.onselectionchange() 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): def ondoubleclick(self, evt):
self.send_message('annotations', type='double-click') self.send_message('annotations', type='double-click')