Clicking outside middle should act like clicking the finish button not the adjust selection button

This commit is contained in:
Kovid Goyal 2020-07-28 09:50:19 +05:30
parent 8de5a4ed86
commit ebb83d97b8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -540,7 +540,10 @@ class CreateAnnotation: # {{{
def container_clicked(self, ev):
ev.stopPropagation(), ev.preventDefault()
self.hide_middle()
if self.middle.style.display is not 'none':
self.hide_middle()
self.accept()
return
if self.state is WAITING_FOR_CLICK:
pt = map_to_iframe_coords({'x': ev.clientX, 'y': ev.clientY})
self.send_message('position-handles-at-point', x=pt.x, y=pt.y)