Restore focus after closing highlight editor

This commit is contained in:
Kovid Goyal 2020-08-05 19:41:11 +05:30
parent 081c14c18a
commit ef35803ddb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -670,6 +670,7 @@ class SelectionBar:
if not apply_changes: if not apply_changes:
self.state = WAITING self.state = WAITING
self.update_position() self.update_position()
self.container.focus()
return return
ed = self.current_editor ed = self.current_editor
self.current_editor = None self.current_editor = None
@ -681,6 +682,7 @@ class SelectionBar:
self.state = WAITING self.state = WAITING
self.update_position() self.update_position()
get_session_data().set('highlight_style', self.current_highlight_style.style) get_session_data().set('highlight_style', self.current_highlight_style.style)
self.container.focus()
def editor_container_clicked(self, ev): def editor_container_clicked(self, ev):
ev.stopPropagation(), ev.preventDefault() ev.stopPropagation(), ev.preventDefault()