Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onkeydown(event) {
if (isEscape(event)) {
return this._handleEscape(event);
}
if (isSpace(event)) {
event.preventDefault();
}
}
onkeyup(event) {
if (isSpace(event) && this.__spaceDown) {
this.fireEvent("press");
this.__spaceDown = false;
}
}
onkeyup(event) {
const headerUsed = this._headerOnTarget(event.ui5target);
if (isSpace(event) && headerUsed) {
this._toggleOpen();
}
}
onkeydown(event) {
if (isSpace(event)) {
event.preventDefault();
this.__spaceDown = true;
} else if (isEnter(event)) {
this.onclick(event);
}
}
onkeydown(event) {
const headerUsed = this._headerOnTarget(event.ui5target);
if (isEnter(event) && headerUsed) {
this._toggleOpen();
}
if (isSpace(event) && headerUsed) {
event.preventDefault();
}
}
_keydown(event) {
const isBS = isBackSpace(event);
const isD = isDelete(event);
if (!this.readonly && (isBS || isD)) {
event.preventDefault();
this.fireEvent("delete", {
backSpace: isBS,
"delete": isD,
});
}
if (isEnter(event) || isSpace(event)) {
this.fireEvent("select", {});
}
}