cocoa: preventing sending of setFocus message to a control already focused. bug #36111

git-svn-id: trunk@62161 -
This commit is contained in:
dmitry 2019-11-03 00:27:13 +00:00
parent f06e1e33c9
commit d8191b7e9b

View File

@ -1268,7 +1268,11 @@ end;
procedure TLCLCommonCallback.BecomeFirstResponder;
begin
LCLSendSetFocusMsg(Target);
if not Assigned(Target) then Exit;
// LCL is unable to determine the "already focused" message
// thus Cocoa related code is doing that.
if not Target.Focused then
LCLSendSetFocusMsg(Target);
end;
procedure TLCLCommonCallback.ResignFirstResponder;