Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: Set query focus to entry box on Windows #90788

Closed
terryjreedy opened this issue Feb 3, 2022 · 4 comments
Closed

IDLE: Set query focus to entry box on Windows #90788

terryjreedy opened this issue Feb 3, 2022 · 4 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

BPO 46630
Nosy @terryjreedy, @miss-islington
PRs
  • bpo-46630: Fix initial focus of IDLE query dialogs #31112
  • [3.10] bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112) #31114
  • [3.9] bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112) #31115
  • 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

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = <Date 2022-02-03.22:43:56.606>
    created_at = <Date 2022-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 = <Date 2022-02-03.22:43:56.605>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2022-02-03.22:43:56.605>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2022-02-03.22:43:56.606>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2022-02-03.20:37:52.186>
    creator = 'terry.reedy'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46630
    keywords = ['patch']
    message_count = 4.0
    messages = ['412465', '412477', '412479', '412480']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'miss-islington']
    pr_nums = ['31112', '31114', '31115']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue46630'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @terryjreedy
    Copy link
    Member Author

    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.

    @terryjreedy terryjreedy added topic-IDLE type-bug An unexpected behavior, bug, or error labels Feb 3, 2022
    @terryjreedy
    Copy link
    Member Author

    New changeset d1df81a by Terry Jan Reedy in branch 'main':
    bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)
    d1df81a

    @miss-islington
    Copy link
    Contributor

    New changeset dc315f3 by Miss Islington (bot) in branch '3.9':
    bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)
    dc315f3

    @miss-islington
    Copy link
    Contributor

    New changeset 4f76b36 by Miss Islington (bot) in branch '3.10':
    bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)
    4f76b36

    @terryjreedy terryjreedy added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels Feb 3, 2022
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants