[issue27115] IDLE/tkinter: in simpledialog, <Return> != [OK] click

Louie Lu report at bugs.python.org
Fri May 26 08:44:15 EDT 2017


Louie Lu added the comment:

We can solve this problem by two ways.

One is to add set_line_and_column() to the end of goto_line_event(), but this will make Return trigger set_line_and_column twice.

Another is to change the bind event in simpledialog from "<Return>" to "<KeyRelease-Return>" to prevent editor use the KeyRelease event. But I think this will have some backward-compatibility problem, maybe we should add a parameter to control buttonbox bind on "<Return>" or "<KeyRelease-Return>".

Then we can add set_line_and_column() to the end of the goto_line_event(), and have no problem about trigging twice.

----------
nosy: +louielu

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27115>
_______________________________________


More information about the Python-bugs-list mailing list