MCPcopy Index your code
hub / github.com/UI5/webcomponents / _handleDefaultAction

Method _handleDefaultAction

packages/main/src/SplitButton.ts:427–446  ·  view source on GitHub ↗

* Handles the default action and the active state of the respective button. * @param e - keyboard event * @private

(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

425 * @private
426 */
427 _handleDefaultAction(e: KeyboardEvent) {
428 e.preventDefault();
429 const target = e.target as Button;
430
431 if (isEnter(e)) {
432 if (this.arrowButton && target === this.arrowButton) {
433 this._activeArrowButton = true;
434 this._fireArrowClick();
435 return;
436 }
437
438 this._textButtonActive = true;
439 this._fireClick(e);
440 return;
441 }
442
443 if (isTabPrevious(e) || isTabNext(e)) {
444 this._resetActionButtonStates();
445 }
446 }
447
448 get effectiveActiveArrowButton() {
449 return this.activeArrowButton || this._activeArrowButton;

Callers 1

_onKeyDownMethod · 0.95

Calls 6

_fireArrowClickMethod · 0.95
_fireClickMethod · 0.95
isEnterFunction · 0.85
isTabPreviousFunction · 0.85
isTabNextFunction · 0.85

Tested by

no test coverage detected