[issue46630] IDLE: Set query focus to entry box on Windows

Terry J. Reedy report at bugs.python.org
Thu Feb 3 15:37:52 EST 2022


New submission from Terry J. Reedy <tjreedy at udel.edu>:

On Mac, and I presume *nix in general, query boxes open with the focus on the first entry box, with the cursor displayed.  One can immediate enter a line number, dotted module name, or whatever. On Windows, since 3.9, one must hit Tab or click on the entry box to set the focus.  If a blank entry is an error, one can even click on OK or hit Enter and the focus will move after an error message.

idlelib/query.py already has self.entry.focus_set.  Why did that stop working in 3.9?  All patches to query.py were before May 2021 and backported to 3.8.  Perhaps the upgrade from tk 8.6.9 to 8.6.12 had an effect given the code as it is.  Text widgets have the same issue and Editor window has 'text.focus_set' in '__init__' and that works.  Whatever, moving entry.focus_set() to just after self.deiconify() works without affecting unittests both in Windows repository and 3.11 installed on macOS.

----------
assignee: terry.reedy
components: IDLE
messages: 412465
nosy: terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Set query focus to entry box on Windows
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46630>
_______________________________________


More information about the Python-bugs-list mailing list