Cannot close modal form with OK, Cancel buttons by pressing Enter or Escape when another control has focus
Original Reporter info from Mantis: cobines
-
Reporter name:
Original Reporter info from Mantis: cobines
- Reporter name:
Description:
Regression after r.37142.
When a modal form has default button OK with ModalResult=mrOK and button Cancel with ModalResult=mrCancel and Cancel=True and focus is in another control (for example TEdit) then pressing Enter or Escape doesn't close form.
This doesn't work on Win32 and Linux / LCLQt, LCLGtk2.
Steps to reproduce:
- Run application, press Show Modal button.
- Edit control has focus. Pressing Enter or Escape should close the form but it doesn't.
Mantis conversion info:
- Mantis ID: 21933
- OS: Debian
- OS Build: Sid
- Build: 37146
- Platform: Linux i386
- Version: 1.1 (SVN)
- Fixed in version: 1.1 (SVN)
- Fixed in revision: 37150 (#f8dcbb66)