Viewer: Preselect text in search box when showing it. Fixes #1847677 [New Viewer Search](https://bugs.launchpad.net/calibre/+bug/1847677)

This commit is contained in:
Kovid Goyal 2019-10-11 07:12:19 +05:30
parent b17b3f358d
commit 5679a596d0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -80,7 +80,8 @@ class SearchOverlay:
def show(self):
c = self.container
c.style.display = 'block'
c.querySelector('input').focus()
inp = c.querySelector('input')
inp.focus(), inp.select()
def find(self, text, backwards):
if not text: