Default button gets executed out of order.
Original Reporter info from Mantis: taazz
-
Reporter name: John Kozikopoulos
Original Reporter info from Mantis: taazz
- Reporter name: John Kozikopoulos
Description:
When you have a combo box on a form with a combo box and you have the combo box list open selecting an item pressing enter to select the item will fire the default button's onclick event right after the combo box list is closed.
See attached application just open the combo box list (alt+down) select any item and press enter to close the combo box list, the application will exit.
Steps to reproduce:
Place a combo box on a form and add some items to its list.
Place a button on the same form and set its default property to true.
on the button's on click event write the command Close;
run the application and show the form if it is the main form then ignore this one.
now select the combo box pres alt+down arrow to open the selection list
use the arrow keys to select any item
press enter to select it.
The form is now closed and you left staring the screen wandering why
Additional information:
tested it also on Lazarus 1.1 r38674 and the problem exists there as well.