Same fix for bottom margin as well

This commit is contained in:
Kovid Goyal 2019-10-06 12:36:01 +05:30
parent cd2049befd
commit 73077b2207
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -166,7 +166,7 @@ class View:
E.div(style='flex-grow:2; display:flex; align-items:stretch; flex-direction: column', # container for top and bottom margins
margin_elem(sd, 'margin_top', 'book-top-margin', self.top_margin_clicked),
E.iframe(id=iframe_id, seamless=True, sandbox='allow-popups allow-scripts allow-popups-to-escape-sandbox', style='flex-grow: 2', allowfullscreen='true'),
margin_elem(sd, 'margin_bottom', 'book-bottom-margin'),
margin_elem(sd, 'margin_bottom', 'book-bottom-margin', self.bottom_margin_clicked),
),
right_margin,
E.div(style='position: absolute; top:0; left:0; width: 100%; pointer-events:none; display:none', id='book-search-overlay'), # search overlay
@ -240,6 +240,11 @@ class View:
if event.button is 0:
event.preventDefault(), event.stopPropagation()
self.show_chrome()
else:
self.focus_iframe()
def bottom_margin_clicked(self, event):
self.focus_iframe()
def forward_gesture(self, gesture):
self.iframe_wrapper.send_message('gesture_from_margin', gesture=gesture)