Issue with Keypress

Under TMS WEB Core 3.0.3.0, TCustomControl.HandleDoKeyPress (the native keypress listener bound to input controls) calls GetKeyChar(AEvent.key) to translate the browser's KeyboardEvent.key into the Char passed to a component's OnKeyPress. When AEvent.key is undefined — which happens with certain synthetic/programmatic key events rather than genuine user keystrokes (in our case, reproducibly reported when a client tapped the Safari QuickType autofill suggestion to fill a saved password on an iPad, on the second login attempt after an initial failed attempt) — GetKeyChar's fallback branch executes the following with no guard:

Result = AValue.charAt(0);

...which throws:

TypeError: undefined is not an object (evaluating 'AValue.charAt')

This aborts the event entirely — no OnKeyPress handler ever fires.

Notably, the sibling function GetKeyCode (used for OnKeyDown/OnKeyUp, same unit) already defends against exactly this case. Its equivalent fallback is:

if (pas.System.Assigned(AValue) && (AValue.length > 0)) {
  i = AValue.charCodeAt(1 - 1);
  ...
}

So GetKeyChar appears to simply be missing the same null/empty check that GetKeyCode already has.

Suggested fix: add an equivalent Assigned(AValue) and (AValue <> '') guard to GetKeyChar's final else branch, returning #0 (matching IsKeyCharacter's and HandleDoKeyPress's existing handling of a null/#0 result) when AValue is empty or unassigned, instead of unconditionally calling .charAt(0) on it.

Thanks for reporting.
We applied an improvement for this and the next update of TMS WEB Core will include this improvement.