Allow for buttonAttributes to omit "buttons" field. Remove outline style for useButtonTag.

This commit is contained in:
Francisco Hodge
2025-07-31 18:47:40 -04:00
parent 6101ccf2a6
commit 2afa6f0a63
2 changed files with 9 additions and 7 deletions

View File

@@ -1459,14 +1459,17 @@ class SimpleKeyboard {
attrObj.attribute &&
typeof attrObj.attribute === "string" &&
attrObj.value &&
typeof attrObj.value === "string" &&
attrObj.buttons &&
typeof attrObj.buttons === "string"
typeof attrObj.value === "string"
) {
const attrObjButtons = attrObj.buttons.split(" ");
if (attrObjButtons.includes(button)) {
// If buttons is empty, undefined, or not a string, apply to all buttons
if (!attrObj.buttons || typeof attrObj.buttons !== "string") {
callback(attrObj.attribute, attrObj.value);
} else {
const attrObjButtons = attrObj.buttons.split(" ");
if (attrObjButtons.includes(button)) {
callback(attrObj.attribute, attrObj.value);
}
}
} else {
console.warn(

View File

@@ -24,7 +24,6 @@
/* When using option "useButtonTag" */
.hg-theme-default button.hg-button {
border-width: 0;
outline: 0;
font-size: inherit;
}