LCL: TCustomMaskEdit, do not set selection if control isn't focused. issue #17942

git-svn-id: trunk@49301 -
This commit is contained in:
zeljko 2015-06-09 08:22:26 +00:00
parent 6cf8c56cfc
commit 41459427dc

View File

@ -757,7 +757,7 @@ begin
begin
if FCursorPos < 0 then FCursorPos := 0
else if FCursorPos > FMaskLength then FCursorPos := FMaskLength;
if FCursorPos + 1 > FMaskLength then
if (FCursorPos + 1 > FMaskLength) or not Focused then
SetSel(FCursorPos, FCursorPos)
else
SetSel(FCursorPos, FCursorPos + 1);