nt.code; switch (keyCode) { case "ArrowLeft": // Intentional fall-through case "ArrowRight": // Intentional fall-through case "ArrowUp": // Intentional fall-through case "ArrowDown": { if (this.shadowRoot.activeElement === this.primaryButton) { this.closeButton.focus(); } else { this.primaryButton.focus(); } break; } } }, { capture: true } ); } handleClose(event) { // Keep the menu open by stopping the click event from // propagating up. event.stopPropagation(); this.dispatchEvent(new CustomEvent("MenuMessage:Close"), { bubbles: true, }); } handlePrimaryButton() { this.dispatchEvent(new CustomEvent("MenuMessage:PrimaryButton"), { bubbles: true, }); } get isRowLayout() { return this.layout === "row"; } render() { return html`