TTMSFNCMemo loses keyboard input after window focus change (VCL)

Hi,

I would like to use TTMSFNCMemo based on Monaco (which is a really great idea BTW) in my VCL application. Unfortunately, I am facing a very annoying bug: sometimes it becomes impossible to type into the control after switching to another window and then returning to the application.

I recorded a video showing the issue:

vidtms

This problem can easily be reproduced using your own demo project:

Products\tms.fnc.uipack\Demos\VCL\Memo\Default\VCLTMSFNCMemoDemo.dproj

Sometimes typing works immediately after returning to the application, but other times it becomes completely impossible to type anything unless I click on the control many times, as if trying to give it focus again. The caret is blinking and it looks like typing should work, but no input is received.

The same issue can also occur after displaying a ShowMessage dialog and then returning to the control. It is even worse when the control is placed on an MDI child form.

Could you please suggest a fix or a workaround for this issue?

Using Delphi 13 with all patches. Last FNC UI Pack available.

Thank you in advance.

We’ll investigate asap

1 Like

We have investigated this here and could reproduce the issue. Currently further investigating why this is the case.

Hi,

We identified the issue and applied a fix, next version of TMS FNC UI Pack will address this. You can meanwhile test the fix by commenting the following line in the DoEnter method:

procedure TTMSFNCCustomMemo.DoEnter;
begin
  inherited;
//ExecuteJavascript(GetControlId + 'editor.focus()');
end;

I tested your fix and rebuilt the component pack using TMS Setup (Full Build, not Install), but the issue still persists on my side.