Skip to content

Commit

Permalink
feat(ui5-split-button): address code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hinzzx committed Nov 14, 2023
1 parent dbd74d4 commit f2fb3c1
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions packages/main/src/SplitButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class SplitButton extends UI5Element {
const buttons: Array<Button | SplitButton> = [this.textButton!, this.arrowButton!, this];

buttons.forEach(btn => {
if (btn) { btn.focused = btn === button; }
btn.focused = btn === button;
});
}

Expand Down Expand Up @@ -382,25 +382,16 @@ class SplitButton extends UI5Element {
} else if (this._isDefaultAction(e)) {
this._isDefaultActionPressed = false;
this._textButtonActive = false;
this._activeArrowButton = false;
if (isSpace(e)) {
e.preventDefault();
e.stopPropagation();
this._fireClick();
this._spacePressed = false;
this._textButtonActive = false;
this.arrowButton!._keepActiveState = false;
}
}

if (this._isShiftOrEscape(e)) {
if (this.activeArrowButton) {
this._activeArrowButton = true;
this.arrowButton!._keepActiveState = true;
} else {
this._activeArrowButton = false;
}

this._handleShiftOrEscapePressed();
}

Expand Down

0 comments on commit f2fb3c1

Please sign in to comment.