TApplication: call EditingDone in respons to VK_RETURN before calling DefaultControl's ExecuteDefaultAction.

Fixes issue #0020057.

git-svn-id: trunk@46427 -
This commit is contained in:
bart 2014-10-04 10:59:54 +00:00
parent b97a08344a
commit b55a4754f9

View File

@ -2111,7 +2111,10 @@ begin
and ((lDefaultControl.Parent = nil) or (lDefaultControl.Parent.CanFocus))
and lDefaultControl.Enabled and lDefaultControl.Visible then
begin
//debugln('TApplication.ControlKeyUp VK_RETURN ', Acontrol.Name);
//debugln('TApplication.DoReturnKey VK_RETURN ', Acontrol.Name);
//Setting Key to VK_UKNOWN prevents the calling of KeyUpAfterInterface,
//which tiggers EditingDone when Key = VK_RETURN, so we call it here
AControl.EditingDone;
lDefaultControl.ExecuteDefaultAction;
Key := VK_UNKNOWN;
end;