diff --git a/src/lib/components/Keyboard.ts b/src/lib/components/Keyboard.ts index 2f5c4b83..5e7c18ff 100644 --- a/src/lib/components/Keyboard.ts +++ b/src/lib/components/Keyboard.ts @@ -762,19 +762,6 @@ class SimpleKeyboard { * @param {object} options The options to set */ onSetOptions(changedOptions: string[] = []): void { - /** - * Changed: inputName - */ - if (changedOptions.includes("inputName")) { - /** - * inputName changed. This requires a caretPosition reset - */ - if (this.options.debug) { - console.log("inputName changed. caretPosition reset."); - } - this.setCaretPosition(null); - } - /** * Changed: layoutName */ diff --git a/src/lib/components/tests/Keyboard.test.js b/src/lib/components/tests/Keyboard.test.js index 43e223fd..f6e741d9 100644 --- a/src/lib/components/tests/Keyboard.test.js +++ b/src/lib/components/tests/Keyboard.test.js @@ -1138,27 +1138,6 @@ it('Keyboard disableRowButtonContainers will bypass parseRowDOMContainers', () = expect(containers.length).toBe(0); }); -it('Keyboard inputName change will trigget caretPosition reset', () => { - const keyboard = new Keyboard(); - - keyboard.setCaretPosition(0); - - keyboard.getButtonElement("q").onpointerdown(); - keyboard.getButtonElement("1").onpointerdown(); - - expect(keyboard.getCaretPosition()).toBe(2); - - keyboard.setOptions({ - inputName: "myInput" - }); - - keyboard.getButtonElement("q").onpointerdown(); - keyboard.getButtonElement("1").onpointerdown(); - keyboard.getButtonElement("b").onpointerdown(); - - expect(keyboard.getCaretPosition()).toBe(null); -}); - it('Keyboard destroy will work', () => { const keyboard = new Keyboard(); keyboard.destroy();