diff --git a/web/source/keyboards/kmwkeyboards.ts b/web/source/keyboards/kmwkeyboards.ts index 051cdd940c..3ecd69ec20 100644 --- a/web/source/keyboards/kmwkeyboards.ts +++ b/web/source/keyboards/kmwkeyboards.ts @@ -1181,7 +1181,7 @@ namespace com.keyman.keyboards { * @param {string} x keyboard name string * */ - removeKeyboards(x: string) { + removeKeyboards(x: string, force?: boolean) { if(arguments.length == 0) { return false; } @@ -1205,7 +1205,16 @@ namespace com.keyman.keyboards { if(j < 0) { success = false; } - } + } + + for(i=0; i=0; j--) { + if('Keyboard_'+arguments[i] == this.keyboards[j]['KI']) { + this.keyboards.splice(j, 1); + break; + } + } + } if(activeRemoved) { if(this.keyboardStubs.length > 0) { diff --git a/web/source/kmwbase.ts b/web/source/kmwbase.ts index 71632a5fe1..1b56ff18d5 100644 --- a/web/source/kmwbase.ts +++ b/web/source/kmwbase.ts @@ -303,10 +303,11 @@ namespace com.keyman { /** * Build 362: removeKeyboards() remove keyboard from list of available keyboards * - * @param {string} x keyboard name string + * @param {string} x keyboard name string + * @param {boolean} force When true, also drops the cached keyboard object * */ - ['removeKeyboards'](x) { + ['removeKeyboards'](x, force?) { return this.keyboardManager.removeKeyboards(x); }