Tk Source Code

View Ticket
Login
Ticket UUID: df09b0665cfb22b4bdfc41e34fc466739d488d65
Title: entry can't get the focus after tk_getSaveFile or tk_getOpenFile is called
Type: Bug Version: 8.6.1
Submitter: anonymous Created on: 2014-01-12 00:40:07
Subsystem: 55. [focus] Assigned To: nobody
Priority: 5 Medium Severity: Important
Status: Closed Last Modified: 2026-10-09 15:36:34
Resolution: Fixed Closed By: nemethi
    Closed on: 2026-10-09 15:36:34
Description:
~ Code

ttk::combobox .c
ttk::entry .e # either ttk::entry or entry
pack .c .e
tk_getOpenFile # either this or tk_getSaveFile

~ Steps to Reproduce

0. Save the code above as a script file
1. Run it
2. Deal with the "Open File" stuff. Try to click on the entry; nothing happens
3. Click on combobox's button
4. Then click on the entry; it gets the focus

~ Actual Results

The entry can't get the focus before we click on the combobox

~ Expected Results

The entry should always be responsible for user's clicks.

~ Additional Information

Windows 7 x64.

Adding [focus .e] doesn't help.
User Comments: nemethi (claiming to be Csaba Nemethi) added on 2026-10-09 15:36:34:

Serhiy, many thanks for the fix! Merged into main, core-9-0-branch, and core-8-6-branch by commits [c487406d], [01bf2744], and [7de1b478].


serhiy.storchaka added on 2026-09-18 19:03:28:

Same cause as [adb71ed70b], fixed in branch [d8d65f6671].


fvogel added on 2019-12-21 15:34:23:

This problem was reported again, see [adb71ed70b].

Note: as per analysis in that bug report, adding focus -force .e works.