You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee='https://github.com/terryjreedy'closed_at=<Date2022-02-03.22:43:56.606>created_at=<Date2022-02-03.20:37:52.186>labels= ['expert-IDLE', 'type-bug', '3.9', '3.10', '3.11']
title='IDLE: Set query focus to entry box on Windows'updated_at=<Date2022-02-03.22:43:56.605>user='https://github.com/terryjreedy'
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.