cocoa: mouse handling events for text edit fields

git-svn-id: trunk@58559 -
This commit is contained in:
dmitry 2018-07-18 04:50:26 +00:00
parent 6fffb8a648
commit 4563d0109f

View File

@ -550,9 +550,10 @@ procedure TCocoaTextField.mouseDown(event: NSEvent);
begin
if Assigned(callback) and not callback.MouseUpDownEvent(event) then
begin
writeln('mouse down');
inherited mouseDown(event);
writeln('mouse down-post');
// the text selection is handled withing mouseDown
if Assigned(callback) then
callback.MouseUpDownEvent(event, True);
end;
end;
@ -560,9 +561,7 @@ procedure TCocoaTextField.mouseUp(event: NSEvent);
begin
if Assigned(callback) and not callback.MouseUpDownEvent(event) then
begin
writeln('mouse up');
inherited mouseUp(event);
writeln('mouse up-post');
end;
end;
@ -819,7 +818,12 @@ end;
procedure TCocoaSecureTextField.mouseDown(event: NSEvent);
begin
if Assigned(callback) and not callback.MouseUpDownEvent(event) then
begin
inherited mouseDown(event);
if Assigned(callback) then
callback.MouseUpDownEvent(event, True);
end;
end;
procedure TCocoaSecureTextField.mouseUp(event: NSEvent);