From 5679a596d0df70208e637c2ffca75cdcde31ad38 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 11 Oct 2019 07:12:19 +0530 Subject: [PATCH] Viewer: Preselect text in search box when showing it. Fixes #1847677 [New Viewer Search](https://bugs.launchpad.net/calibre/+bug/1847677) --- src/pyj/read_book/search.pyj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyj/read_book/search.pyj b/src/pyj/read_book/search.pyj index b6699d4d72..4d980bb853 100644 --- a/src/pyj/read_book/search.pyj +++ b/src/pyj/read_book/search.pyj @@ -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: