Fix #1927011 [[Enhancement] Place the cursor at the end of the Edit notes for highlight window](https://bugs.launchpad.net/calibre/+bug/1927011)

This commit is contained in:
Kovid Goyal 2021-05-04 10:50:45 +05:30
parent ac800859ff
commit 11d62a8e6b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -359,7 +359,6 @@ class EditNotesAndColors: # {{{
onclick=def(ev): ev.stopPropagation();,
id=unique_id(), E.div(
E.textarea(
current_notes or '',
placeholder=_('Add notes for this highlight. Double click or long tap on a highlight to read its notes.'),
rows='10', spellcheck='true', style='width: 90%;',
onkeydown=handle_keypress,
@ -406,6 +405,8 @@ class EditNotesAndColors: # {{{
self.set_visibility_of_remove_button()
window.setTimeout(self.notes_edit.focus.bind(self.notes_edit), 0)
if current_notes:
self.notes_edit.value = current_notes
def hide_add_style(self, new_style):
c = self.container