diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 64b00c604d..1617a58531 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -128,6 +128,9 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{ def set_readonly(self, what): self.readonly = what + def focus_self(self): + self.setFocus(Qt.TabFocusReason) + def do_clear(self, *args): c = self.textCursor() c.beginEditBlock() @@ -135,7 +138,7 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{ c.movePosition(QTextCursor.End, QTextCursor.KeepAnchor) c.removeSelectedText() c.endEditBlock() - self.setFocus(Qt.OtherFocusReason) + self.focus_self() clear_text = do_clear def do_bold(self):