Add forward delete functionality. Fixes #1033

This commit is contained in:
Francisco Hodge
2021-05-16 14:05:37 -04:00
parent 0409ee337e
commit f5358032d5
7 changed files with 95 additions and 13 deletions
+6 -7
View File
@@ -53,11 +53,9 @@ class SimpleKeyboard {
constructor(...params: KeyboardParams) {
if (typeof window === "undefined") return;
const {
keyboardDOMClass,
keyboardDOM,
options = {},
} = this.handleParams(params);
const { keyboardDOMClass, keyboardDOM, options = {} } = this.handleParams(
params
);
/**
* Initializing Utilities
@@ -474,8 +472,9 @@ class SimpleKeyboard {
* Check if this new input has candidates (suggested words)
*/
if (e?.target && this.options.enableLayoutCandidates) {
const { candidateKey, candidateValue } =
this.getInputCandidates(updatedInput);
const { candidateKey, candidateValue } = this.getInputCandidates(
updatedInput
);
if (candidateKey && candidateValue) {
this.showCandidatesBox(