diff --git a/packages/calcite-components/src/components/action-menu/action-menu.e2e.ts b/packages/calcite-components/src/components/action-menu/action-menu.e2e.ts index 772c1b60644..5ebc0677d44 100755 --- a/packages/calcite-components/src/components/action-menu/action-menu.e2e.ts +++ b/packages/calcite-components/src/components/action-menu/action-menu.e2e.ts @@ -135,6 +135,10 @@ describe("calcite-action-menu", () => { const actionMenu = await page.find("calcite-action-menu"); + const popover = await page.find("calcite-action-menu >>> calcite-popover"); + + expect(await popover.getProperty("autoClose")).toBe(true); + expect(await actionMenu.getProperty("open")).toBe(true); const outside = await page.find("#outside"); diff --git a/packages/calcite-components/src/components/action-menu/action-menu.tsx b/packages/calcite-components/src/components/action-menu/action-menu.tsx index d24fd9f4ddd..556f1b5783f 100755 --- a/packages/calcite-components/src/components/action-menu/action-menu.tsx +++ b/packages/calcite-components/src/components/action-menu/action-menu.tsx @@ -4,7 +4,6 @@ import { Event, EventEmitter, h, - Listen, Method, Prop, State, @@ -133,21 +132,6 @@ export class ActionMenu implements LoadableComponent { */ @Event({ cancelable: false }) calciteActionMenuOpen: EventEmitter; - @Listen("pointerdown", { target: "window" }) - closeCalciteActionMenuOnClick(event: PointerEvent): void { - if (!isPrimaryPointerButton(event)) { - return; - } - - const composedPath = event.composedPath(); - - if (composedPath.includes(this.el)) { - return; - } - - this.open = false; - } - // -------------------------------------------------------------------------- // // Private Properties @@ -304,10 +288,12 @@ export class ActionMenu implements LoadableComponent { return ( { + this.open = false; + }; }