From d9e6e8f2906bba5301136c001f0002aa6ee617d7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 16 Apr 2020 14:49:30 +0530 Subject: [PATCH] Prevent default context menu on top level read books container --- src/pyj/read_book/view.pyj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index 3ec5668696..4c8d53164e 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -205,7 +205,11 @@ class View: sandbox += ' allow-same-origin' container.appendChild( E.div(style='max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; display: flex; align-items: stretch', # container for horizontally aligned panels - E.div(style='max-height: 100vh; display: flex; flex-direction: column; align-items: stretch; flex-grow:2', # container for iframe and any other panels in the same column + oncontextmenu=def (ev): + ev.preventDefault() + , + + E.div(style='max-height: 100vh; display: flex; flex-direction: column; align-items: stretch; flex-grow:2', # container for iframe and any other panels in the same column E.div(style='max-height: 100vh; flex-grow: 2; display:flex; align-items: stretch', # container for iframe and its overlay left_margin, E.div(style='flex-grow:2; display:flex; align-items:stretch; flex-direction: column', # container for top and bottom margins