diff --git a/web/src/app/browser/src/contextManager.ts b/web/src/app/browser/src/contextManager.ts index e9439cdb76..0bea973161 100644 --- a/web/src/app/browser/src/contextManager.ts +++ b/web/src/app/browser/src/contextManager.ts @@ -403,9 +403,10 @@ export class ContextManager extends ContextManagerBase { } /** - * Allows setting a control to a specific keyboard that does not change if the active keyboard changes when other - * controls are active. Only activates the keyboard if the specified control represents the currently-active - * context. + * Allows setting a control to a specific keyboard that does not change if + * the active keyboard changes when other controls are active. Only + * activates the keyboard if the specified control represents the + * currently-active context. * * This is the core method that backs * https://help.keyman.com/developer/engine/web/current-version/reference/core/setKeyboardForControl. @@ -561,13 +562,13 @@ export class ContextManager extends ContextManagerBase { * Description Stores the last active element's keyboard settings. Should be called * whenever a KMW-enabled page element loses control. */ - public _BlurKeyboardSettings(lastElem: HTMLElement, PInternalName?: string, PLgCode?: string): void { + private _BlurKeyboardSettings(lastElem: HTMLElement, internalName?: string, lgCode?: string): void { let keyboardID = this.activeKeyboard ? this.activeKeyboard.keyboard.id : ''; let langCode = this.activeKeyboard?.metadata.langId; - if(PInternalName !== undefined && PLgCode !== undefined) { - keyboardID = PInternalName; - langCode = PLgCode; + if(internalName !== undefined && lgCode !== undefined) { + keyboardID = internalName; + langCode = lgCode; } if(lastElem && lastElem._kmwAttachment.keyboard != null) { @@ -585,7 +586,7 @@ export class ContextManager extends ContextManagerBase { * whenever a KMW-enabled page element gains control, but only once the prior * element's loss of control is guaranteed. */ - public _FocusKeyboardSettings(lastElem: HTMLElement, blockGlobalChange: boolean): void { + private _FocusKeyboardSettings(lastElem: HTMLElement, blockGlobalChange: boolean): void { // Important pre-condition: the newly-focused element must be set as active. const attachment = lastElem._kmwAttachment; const global = this.globalKeyboard; @@ -606,7 +607,7 @@ export class ContextManager extends ContextManagerBase { * The return value indicates whether (true) or not (false) the calling event handler * should be terminated immediately after the call. */ - public _CommonFocusHelper(textStore: AbstractElementTextStore): boolean { + private _CommonFocusHelper(textStore: AbstractElementTextStore): boolean { const {focusAssistant} = this; const activeKeyboard = this.activeKeyboard?.keyboard; @@ -631,7 +632,7 @@ export class ContextManager extends ContextManagerBase { /** * Respond to KeymanWeb-aware input element receiving focus */ - public _ControlFocus = (e: FocusEvent): boolean => { + private _ControlFocus = (e: FocusEvent): boolean => { // Step 1: determine the corresponding TextStore instance. const textStore = textStoreForEvent(e); if(!textStore) { @@ -656,7 +657,7 @@ export class ContextManager extends ContextManagerBase { /** * Respond to KMW losing focus on event */ - public _ControlBlur = (e: FocusEvent): boolean => { + private _ControlBlur = (e: FocusEvent): boolean => { // Step 0: if we're in a state where loss-of-focus should be outright-ignored, bypass the handler entirely. if(this.focusAssistant._IgnoreNextSelChange) { @@ -728,7 +729,7 @@ export class ContextManager extends ContextManagerBase { return true; } - doChangeEvent(textStore: AbstractElementTextStore) { + private doChangeEvent(textStore: AbstractElementTextStore) { if(textStore.changed) { const event = new Event('change', {"bubbles": true, "cancelable": false}); textStore.getElement().dispatchEvent(event); @@ -737,7 +738,7 @@ export class ContextManager extends ContextManagerBase { textStore.changed = false; } - public _Click: (e: MouseEvent) => boolean = (e: MouseEvent) => { + private _Click: (e: MouseEvent) => boolean = (e: MouseEvent) => { this.resetContext(); return true; }; diff --git a/web/src/engine/src/attachment/attachmentInfo.ts b/web/src/engine/src/attachment/attachmentInfo.ts index c5752a5093..8b37a6ca07 100644 --- a/web/src/engine/src/attachment/attachmentInfo.ts +++ b/web/src/engine/src/attachment/attachmentInfo.ts @@ -4,12 +4,12 @@ export class AttachmentInfo { /** * Tracks the language code corresponding to the `keyboard` field. */ - languageCode: string; + public languageCode: string; /** * Tracks the inputmode originally set by the webpage. */ - inputMode?: string; + public inputMode?: string; /** * Constructor for AttachmentInfo. @@ -18,4 +18,4 @@ export class AttachmentInfo { * @param keyboard - Provides the keyboard identifier. */ constructor(public readonly textStore: AbstractElementTextStore, public keyboard: string) {} -} \ No newline at end of file +}