mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 02:49:30 +02:00
LCL: ComboBox: Fixed data lost, Style csSimple, leaving with TAB. Issue #35087. Patch by Gernot Riebold
git-svn-id: trunk@63204 -
This commit is contained in:
parent
f48f7cee1a
commit
47ba57fd3a
@ -490,14 +490,12 @@ begin
|
||||
FEditingDone := Key = VK_RETURN;
|
||||
Skip := False;
|
||||
UserDropDown := ((Shift *[ssAlt] = [ssAlt]) and (Key = VK_DOWN));
|
||||
PreventDropDown := Key in [VK_TAB, VK_RETURN, VK_ESCAPE];
|
||||
if Style = csSimple then
|
||||
PreventDropDown := Key in [VK_RETURN, VK_ESCAPE]
|
||||
else
|
||||
PreventDropDown := Key in [VK_TAB, VK_RETURN, VK_ESCAPE];
|
||||
if PreventDropDown then
|
||||
begin
|
||||
// Prevent execution of DefaultAction (Delphi compatibility) except for
|
||||
// style csSimple. There DroppedDown is always true (Delphi compatible).
|
||||
// Tab key should work further and shouldn't be deleted. Issue #32559
|
||||
if DroppedDown and not (Style = csSimple) then
|
||||
Key := VK_UNKNOWN;
|
||||
DroppedDown := False;
|
||||
end;
|
||||
// if AutoDropDown then don't close DropDown, like in Delphi, issue #31247
|
||||
|
Loading…
Reference in New Issue
Block a user