View Issue Details

IDProjectCategoryView StatusLast Update
0024819LazarusLCLpublic2015-05-09 14:17
ReporterJohn KozikopoulosAssigned ToBart Broersma 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.10Product Build r41613 
Target Version1.2.8Fixed in Version 
Summary0024819: Default button gets executed out of order.
DescriptionWhen 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 ReproducePlace 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 Informationtested it also on Lazarus 1.1 r38674 and the problem exists there as well.
TagsNo tags attached.
Fixed in Revisionr46762
LazTarget1.2.8
WidgetsetWin32/Win64
Attached Files

Relationships

related to 0024303 closedJuha Manninen double-clicking on file in the TOpenDialog cause ToolButton.onClick 

Activities

John Kozikopoulos

2013-08-02 19:35

reporter  

Default Test.rar (64,819 bytes)

Zeljan Rikalo

2014-09-24 19:25

developer   ~0077606

What about other widgetsets ?

Zeljan Rikalo

2014-09-24 19:27

developer   ~0077608

Qt and Gtk2 works ok.

Bart Broersma

2014-11-05 19:23

developer   ~0078925

Please close if OK.

Simon Ameis

2015-02-14 23:25

reporter   ~0081081

The error described above is fixed by now (rev 47790). But the default button's OnClick event is still called if the Combobox has focus and enter is pressed (drop down list not shown). This is also the case with a TEdit. Changing the Key in OnClick event doesn't prevent the default button to get into action.

Is this wanted behaviour? If yes, is there an easy way to override it for some controls?

Bart Broersma

2015-02-15 00:33

developer   ~0081083

This Delphi compatible behaviour.

Issue History

Date Modified Username Field Change
2013-08-02 19:35 John Kozikopoulos New Issue
2013-08-02 19:35 John Kozikopoulos File Added: Default Test.rar
2014-09-24 10:26 Juha Manninen Relationship added related to 0024303
2014-09-24 19:25 Zeljan Rikalo LazTarget => -
2014-09-24 19:25 Zeljan Rikalo Note Added: 0077606
2014-09-24 19:25 Zeljan Rikalo Assigned To => Zeljan Rikalo
2014-09-24 19:25 Zeljan Rikalo Status new => feedback
2014-09-24 19:27 Zeljan Rikalo Note Added: 0077608
2014-09-25 08:13 Zeljan Rikalo Assigned To Zeljan Rikalo =>
2014-11-05 19:23 Bart Broersma Fixed in Revision => r46762
2014-11-05 19:23 Bart Broersma LazTarget - => 1.2.8
2014-11-05 19:23 Bart Broersma Note Added: 0078925
2014-11-05 19:23 Bart Broersma Status feedback => resolved
2014-11-05 19:23 Bart Broersma Resolution open => fixed
2014-11-05 19:23 Bart Broersma Assigned To => Bart Broersma
2014-11-05 19:23 Bart Broersma Target Version => 1.2.8
2015-02-14 23:25 Simon Ameis Note Added: 0081081
2015-02-15 00:33 Bart Broersma Note Added: 0081083
2015-05-09 14:17 Bart Broersma Status resolved => closed