summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/query.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-02-03 22:33:26 (GMT)
committerGitHub <noreply@github.com>2022-02-03 22:33:26 (GMT)
commitdc315f30f86a1dc7c4607398b379d7c0b55c7549 (patch)
treeb959d45fe69998e54188514fad7ff5cc9dc12469 /Lib/idlelib/query.py
parentcf7cb1a2bf40516dc571d1d90c12b632dcd9b8c8 (diff)
downloadcpython-dc315f30f86a1dc7c4607398b379d7c0b55c7549.zip
cpython-dc315f30f86a1dc7c4607398b379d7c0b55c7549.tar.gz
cpython-dc315f30f86a1dc7c4607398b379d7c0b55c7549.tar.bz2
bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)
On Windows, one had to Tab or click on the entry box to get a cursor and be able to enter anything. (cherry picked from commit d1df81a730499cc6286d02afa6028a1e9c22bbbf) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib/idlelib/query.py')
-rw-r--r--Lib/idlelib/query.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/query.py b/Lib/idlelib/query.py
index fefa5aa..df02f21 100644
--- a/Lib/idlelib/query.py
+++ b/Lib/idlelib/query.py
@@ -83,6 +83,7 @@ class Query(Toplevel):
if not _utest:
self.deiconify() # Unhide now that geometry set.
+ self.entry.focus_set()
self.wait_window()
def create_widgets(self, ok_text='OK'): # Do not replace.
@@ -100,7 +101,6 @@ class Query(Toplevel):
text=self.message)
self.entryvar = StringVar(self, self.text0)
self.entry = Entry(frame, width=30, textvariable=self.entryvar)
- self.entry.focus_set()
self.error_font = Font(name='TkCaptionFont',
exists=True, root=self.parent)
self.entry_error = Label(frame, text=' ', foreground='red',