FIX: the issue that TKASCDEdit could not gain focus when clicked

This commit is contained in:
rich2014 2026-05-28 17:30:15 +08:00
commit 0ec7b7e32b

View file

@ -26,7 +26,7 @@ unit KASCDEdit;
interface
uses
Classes, SysUtils, LResources, Controls, Graphics, Dialogs, Types,
Classes, SysUtils, LazVersion, LResources, Controls, Graphics, Dialogs, Types,
Menus, CustomDrawnControls, CustomDrawnDrawers, CustomDrawn_Common;
type
@ -412,6 +412,12 @@ begin
begin
inherited MouseDown(Button, Shift, X, Y);
{$IF Laz_FullVersion >= 4990000}
// see also LCL 4b41b7a:
// customdrawn: remove redundant SetFocus from TCDControl.MouseDown
SetFocus();
{$ENDIF}
FDragDropStarted := True;
// Caret positioning