Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_onkeyup(event) {
if (isSpace(event)) {
this.toggle();
}
}
_onkeydown(event) {
if (isSpace(event)) {
event.preventDefault();
}
if (isEnter(event)) {
this.toggle();
}
}
_onkeyup(event) {
if (isSpace(event) || isEnter(event)) {
this.deactivate();
}
if (isSpace(event)) {
this.fireItemPress(event);
}
}
_onkeyup(event) {
if (isSpace(event)) {
this.toggle();
}
}
_onkeydown(event) {
super._onkeydown(event);
const itemActive = this.type === ListItemType.Active;
if (isSpace(event)) {
event.preventDefault();
}
if ((isSpace(event) || isEnter(event)) && itemActive) {
this.activate();
}
if (isEnter(event)) {
this.fireItemPress(event);
}
}
_onkeyup(event) {
if (isSpace(event) || isEnter(event)) {
this.active = false;
}
if (isSpace(event)) {
this._fireItemClick();
}
}
_onkeydown(event) {
if (isUp(event)) {
return this._handleUp(event);
}
if (isDown(event)) {
return this._handleDown(event);
}
if (isSpace(event)) {
return this._handleSpace(event);
}
if (isEnter(event)) {
return this._handleEnter(event);
}
this._keyDown = true;
}
_onkeydown(event) {
if (isSpace(event)) {
event.preventDefault();
}
if (isEnter(event)) {
this.toggle();
}
}
_onkeyup(event) {
if (isSpace(event)) {
this.toggle();
}
}