You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-08-04 21:32:54 +02:00
Fixed issue #446 : OSR browsers don't show the blinking caret when you click on an editable element
This commit is contained in:
@ -12,7 +12,7 @@ object Form1: TForm1
|
||||
OnDestroy = FormDestroy
|
||||
OnHide = FormHide
|
||||
OnShow = FormShow
|
||||
LCLVersion = '2.2.4.0'
|
||||
LCLVersion = '2.2.6.0'
|
||||
object AddressPnl: TPanel
|
||||
Left = 0
|
||||
Height = 30
|
||||
@ -21,7 +21,6 @@ object Form1: TForm1
|
||||
Align = alTop
|
||||
ClientHeight = 30
|
||||
ClientWidth = 1001
|
||||
Enabled = False
|
||||
TabOrder = 1
|
||||
object AddressEdt: TEdit
|
||||
Left = 1
|
||||
@ -77,6 +76,7 @@ object Form1: TForm1
|
||||
end
|
||||
end
|
||||
object Chromium1: TChromium
|
||||
OnCanFocus = Chromium1CanFocus
|
||||
OnTooltip = Chromium1Tooltip
|
||||
OnCursorChange = Chromium1CursorChange
|
||||
OnBeforePopup = Chromium1BeforePopup
|
||||
|
@ -79,6 +79,7 @@ type
|
||||
procedure Chromium1PopupShow(Sender: TObject; const browser: ICefBrowser; aShow: Boolean);
|
||||
procedure Chromium1PopupSize(Sender: TObject; const browser: ICefBrowser; const rect: PCefRect);
|
||||
procedure Chromium1Tooltip(Sender: TObject; const browser: ICefBrowser; var aText: ustring; out Result: Boolean);
|
||||
procedure Chromium1CanFocus(Sender: TObject);
|
||||
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
@ -281,8 +282,7 @@ end;
|
||||
procedure TForm1.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
// Now the browser is fully initialized we can initialize the UI.
|
||||
Caption := 'OSR External Pump Browser';
|
||||
AddressPnl.Enabled := True;
|
||||
Caption := 'OSR External Pump Browser';
|
||||
|
||||
Chromium1.NotifyMoveOrResizeStarted;
|
||||
end;
|
||||
@ -298,6 +298,14 @@ begin
|
||||
FocusWorkaroundEdt.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TForm1.Chromium1CanFocus(Sender: TObject);
|
||||
begin
|
||||
if FocusWorkaroundEdt.Focused then
|
||||
Chromium1.SetFocus(True)
|
||||
else
|
||||
FocusWorkaroundEdt.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TForm1.FocusWorkaroundEdtExit(Sender: TObject);
|
||||
begin
|
||||
Chromium1.SetFocus(False);
|
||||
@ -695,6 +703,8 @@ begin
|
||||
FCanClose := False;
|
||||
FClosing := False;
|
||||
FFirstLoad := True;
|
||||
|
||||
Chromium1.DefaultURL := AddressEdt.Text;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormDestroy(Sender: TObject);
|
||||
|
Reference in New Issue
Block a user