MCPcopy Create free account
hub / github.com/UI5/webcomponents / _onTabExpandButtonClick

Method _onTabExpandButtonClick

packages/main/src/TabContainer.ts:752–781  ·  view source on GitHub ↗
(e: Event)

Source from the content-addressed store, hash-verified

750 }
751
752 async _onTabExpandButtonClick(e: Event) {
753 e.stopPropagation();
754 e.preventDefault();
755
756 let tabInstance: TabInStrip;
757
758 if (isTabInStrip(e.target as HTMLElement)) {
759 tabInstance = e.target as TabInStrip;
760 } else {
761 tabInstance = getTabInStrip(e.target as HTMLElement) as TabInStrip;
762 }
763
764 if (tabInstance) {
765 tabInstance.focus();
766 }
767
768 let opener = e.target as HTMLElement;
769
770 if (e.type === "keydown" && !(e.target as TabInStrip).realTabReference.isSingleClickArea) {
771 opener = (e.target as TabInStrip).querySelector(".ui5-tab-expand-button [ui5-button]")!;
772 }
773
774 // if clicked between the expand button and the tab
775 if (!tabInstance) {
776 this._onHeaderItemSelect(opener.parentElement as HTMLElement, e);
777 return;
778 }
779
780 await this._togglePopover(opener, true);
781 }
782
783 _setPopoverInitialFocus() {
784 const selectedTabInOverflow = this._getSelectedTabInOverflow();

Callers 2

_onTabStripClickMethod · 0.95
_onTabStripKeyDownMethod · 0.95

Calls 5

_onHeaderItemSelectMethod · 0.95
_togglePopoverMethod · 0.95
isTabInStripFunction · 0.85
getTabInStripFunction · 0.85
focusMethod · 0.45

Tested by

no test coverage detected