View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0031900||Lazarus||LCL||public||2017-05-23 16:46||2017-10-13 16:06|
|Reporter||Roger Olsson||Assigned To||Zeljan Rikalo|
|Product Version||1.9 (SVN)|
|Summary||0031900: Order of events: TEdit / TListBox|
|Description||On Windows, Lazarus and Delphi 7 behave the same. Except that Delphi 7 doesn't have the ListBox.SelectionChange event.|
Problem is with Lazarus Linux GTK2. Events behave the *opposite* to Windows Lazarus and Delphi 7:
1) Edit.Exit fires AFTER ListBox.SelectionChange and ListBox.OnClick if selecting a different ListBox item than the currently selected one. Bad, it should behave like under Lazarus Windows so Edit.Exit fires first, before ListBox.SelectionChange and ListBox.OnClick
2) SelectionChange does not fire when clicking an already selected item. Good, shouldn't the Windows implementation also behave like this?
3) Edit.Exit fires BEFORE ListBox.OnClick if selecting an already selected ListBox item. Good. Same as Lazarus Windows and Delphi 7. Mention it just to point out the inconsistency within the same control.
Lazarus Win platform: Edit.Exit always fires first, before ListBox.OnClick (and OnSelectionChange), no matter if the ListBox item is selected or not. Good. Though I would not expect SelectionChange to fire in this case since there is no change in selection?
|Steps To Reproduce||Run demo, click Edit / ListBox|
|Tags||No tags attached.|
|Fixed in Revision||55062|
|Widgetset||GTK 2, GTK 3|
OrderOfEvents.zip (2,458 bytes)
Only Qt works as expected. Order of events is same as under win32 BUT qt does not trigger OnSelectionChanged() when already selected item is clicked. This is win32 bug, it should not send selectionChanged event if selection isn't changed, so I'll open an issue about it.
Gtk2 is definitelly wrong about order of events: OnSelectionChanged() OnClicked() EditExit() - totally wrong.
Note that gtk3 also have same bug. That's because gtk2/3 sends focus message after mouse click and that's bad. Now, gtk2/gtk3 behaves same as qt and win32.
Please test it well, since I'll add it to the merge list for 1.8 (with waiting for feedback).
||Seems to work just fine, Zeljan. Tested under Linux/GTK2 and Windows. Thanks for resolving this old issue!|
|2017-05-23 16:46||Roger Olsson||New Issue|
|2017-05-23 16:46||Roger Olsson||File Added: OrderOfEvents.zip|
|2017-05-23 16:50||Zeljan Rikalo||Assigned To||=> Zeljan Rikalo|
|2017-05-23 16:50||Zeljan Rikalo||Status||new => assigned|
|2017-05-23 17:04||Zeljan Rikalo||LazTarget||=> -|
|2017-05-23 17:04||Zeljan Rikalo||Note Added: 0100626|
|2017-05-23 17:04||Zeljan Rikalo||Status||assigned => confirmed|
|2017-05-23 17:27||Zeljan Rikalo||Relationship added||related to 0024308|
|2017-05-23 17:41||Zeljan Rikalo||Fixed in Revision||=> 55062|
|2017-05-23 17:41||Zeljan Rikalo||Widgetset||GTK 2 => GTK 2, GTK 3|
|2017-05-23 17:41||Zeljan Rikalo||Note Added: 0100627|
|2017-05-23 17:41||Zeljan Rikalo||Status||confirmed => resolved|
|2017-05-23 17:41||Zeljan Rikalo||Resolution||open => fixed|
|2017-05-23 22:50||Roger Olsson||Note Added: 0100640|
|2017-05-24 01:12||Roger Olsson||Note Added: 0100641|
|2017-05-24 01:12||Roger Olsson||Status||resolved => closed|
|2017-08-04 16:10||Bart Broersma||Relationship added||related to 0032237|
|2017-10-13 16:06||Michl||Relationship added||related to 0032515|