Repeated OnClick call by ENTER key and raise exception
Original Reporter info from Mantis: daniel.tecnobyte
-
Reporter name: Daniel Pereira Guimarães
Original Reporter info from Mantis: daniel.tecnobyte
- Reporter name: Daniel Pereira Guimarães
Description:
If you press the ENTER key on a button that raises an exception in the OnClick event and then press the ENTER key again to close the exception dialog, the OnClick event of the button is fired again.
Steps to reproduce:
- Create a new application.
- Add a Button to Form.
- Write Button1.OnClick as:
procedure TForm1.Button1Click(Sender: TObject);
begin
raise Exception.Create(
'Press RETURN / ENTER key to close this dialog.'#13 +
'Note that the OnClick event will fire again.');
end;
- Run the application.
- Set focus to Button1.
- Press ENTER key to perform Button1.OnClick.
- Press ENTER key to close exception dialog.
- Note that the Button1.OnClick event will fire again.
Mantis conversion info:
- Mantis ID: 32056
- OS: Windows
- OS Build: 10.0.14393
- Version: 1.6.4
- Fixed in revision: 55398 (#cbdd1209)