4
0
mirror of https://github.com/hodgef/simple-keyboard.git synced 2025-04-12 11:53:10 +08:00

Adjusting rowDOMContainer check

This commit is contained in:
Francisco Hodge 2020-05-09 15:36:05 -04:00
parent 9942016484
commit 16498ad3c3

@ -1285,12 +1285,15 @@ class SimpleKeyboard {
*/
const buttonHasContainerStart =
!disableRowButtonContainers &&
button.includes("[") &&
button.length > 1;
typeof button === "string" &&
button.length > 1 &&
button.indexOf("[") === 0;
const buttonHasContainerEnd =
!disableRowButtonContainers &&
button.includes("]") &&
button.length > 1;
typeof button === "string" &&
button.length > 1 &&
button.indexOf("]") === button.length - 1;
/**
* Save container start index, if applicable