This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author louielu
Recipients Al.Sweigart, littleq0903, louielu, markroseman, ned.deily, paulsfo, roger.serwy, serhiy.storchaka, suddha.sourav, taleinat, terry.reedy
Date 2017-05-09.13:05:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494335122.37.0.945221406107.issue15786@psf.upfronthosting.co.za>
In-reply-to
Content
The reason why click on listbox will disappear is because we bind HIDE_VIRTUAL_EVENT with <focusOut> on widget.text. When click on listbox, it will focusOut the widget.text then focusOn listbox, thus trigger the hide process.

The reason why click on listbox and move the cursor out of box, then click will freeze IDLE cursor, it because tk will generate three event:  FocusOut, FocusOut, and ButtonPress:


hidell <FocusOut event> generated by:  .!listedtoplevel.!frame.text.!toplevel2.!listbox focus on:  None
hidell <FocusOut event> generated by:  .!listedtoplevel.!frame.text.!toplevel2 focus on:  None
prove <ButtonPress event num=1 x=130 y=390> generated by:  .!listedtoplevel.!frame.text focus on:  .!listedtoplevel.!frame.text

Becase we bind HIDE process on widget.text, it will then trigger hide_window, and at the same time, FoucsOut event is still on the half-way, and then the listbox is destory and reset to None, I think this is why it will freeze until re-focus on IDEL.


Attach PR solve this problem, it re-bind the HIDE process from widget.text to listbox, thus it will not trigger some race-contidion when destroying autocompletewindow.
History
Date User Action Args
2017-05-09 13:05:22louielusetrecipients: + louielu, terry.reedy, taleinat, ned.deily, roger.serwy, markroseman, Al.Sweigart, serhiy.storchaka, littleq0903, suddha.sourav, paulsfo
2017-05-09 13:05:22louielusetmessageid: <1494335122.37.0.945221406107.issue15786@psf.upfronthosting.co.za>
2017-05-09 13:05:22louielulinkissue15786 messages
2017-05-09 13:05:22louielucreate