Fix #2049928 [go to location shortcut doesn't change cursor focus properly](https://bugs.launchpad.net/calibre/+bug/2049928)

This commit is contained in:
Kovid Goyal 2024-01-19 22:27:45 +05:30
parent 59cff497da
commit 32baf23f21
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -150,4 +150,8 @@ def create_location_overlay(current_position_data, book, overlay, container):
display_and_copy(_('URL for this position:'), calibre_book_url)
elif not runtime.is_standalone_viewer:
display_and_copy(_('URL for this position:'), window.top.location.toString())
window.setTimeout(def():
container = document.getElementById(container_id)
if container:
container.querySelector('[name=newpos]').focus()
, 10)