Index: Lib/lib-tk/tkSimpleDialog.py =================================================================== --- Lib/lib-tk/tkSimpleDialog.py (revision 52717) +++ Lib/lib-tk/tkSimpleDialog.py (working copy) @@ -124,10 +124,11 @@ self.withdraw() self.update_idletasks() - self.apply() + try: + self.apply() + finally: + self.cancel() - self.cancel() - def cancel(self, event=None): # put focus back to the parent window