summaryrefslogtreecommitdiff
path: root/Lib/idlelib/query.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2022-02-03 17:06:17 -0500
committerGitHub <noreply@github.com>2022-02-03 17:06:17 -0500
commitd1df81a730499cc6286d02afa6028a1e9c22bbbf (patch)
treec728a247e88283b71117ab2f4cbd04204a70cc5d /Lib/idlelib/query.py
parent916d0d822c79933f4c420f7a36f16f3eb788646b (diff)
downloadcpython-git-d1df81a730499cc6286d02afa6028a1e9c22bbbf.tar.gz
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.
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 fefa5aac1b..df02f2123a 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',