diff --git a/.changeset/beige-cooks-switch.md b/.changeset/beige-cooks-switch.md new file mode 100644 index 0000000000..02df09b1c6 --- /dev/null +++ b/.changeset/beige-cooks-switch.md @@ -0,0 +1,5 @@ +--- +'@swisspost/design-system-components': patch +--- + +Fixed an issue with popovers on Firefox ESR that unexpectedly closed popovers when clicking on content. diff --git a/packages/components/cypress/e2e/popover.cy.ts b/packages/components/cypress/e2e/popover.cy.ts index 637b657896..75e36b354e 100644 --- a/packages/components/cypress/e2e/popover.cy.ts +++ b/packages/components/cypress/e2e/popover.cy.ts @@ -4,7 +4,7 @@ describe('popover', { baseUrl: null, includeShadowDom: true }, () => { cy.visit('./cypress/fixtures/post-popover.test.html'); // Aria-expanded is set by the web component, therefore it's a good measure to indicate the component is ready cy.get('[data-popover-target="popover-one"][aria-expanded]').as('trigger'); - cy.get('div.popover-container').as('popover'); + cy.get('#testtext').as('popover'); }); it('should show up on click', () => { diff --git a/packages/components/cypress/e2e/popovercontainer.cy.ts b/packages/components/cypress/e2e/popovercontainer.cy.ts index a65669d836..cb96c00ca7 100644 --- a/packages/components/cypress/e2e/popovercontainer.cy.ts +++ b/packages/components/cypress/e2e/popovercontainer.cy.ts @@ -6,7 +6,7 @@ describe('popovercontainer', { baseUrl: null, includeShadowDom: true }, () => { // There is no dedicated docs page for the popovercontainer cy.visit('./cypress/fixtures/post-popover.test.html'); cy.get('[data-popover-target="popover-one"][aria-expanded]').as('trigger'); - cy.get('div.popover-container').as('container'); + cy.get('#testtext').as('container'); }); it('should show up on click', () => { diff --git a/packages/components/cypress/e2e/tooltip.cy.ts b/packages/components/cypress/e2e/tooltip.cy.ts index 8aee446dc2..fc41672193 100644 --- a/packages/components/cypress/e2e/tooltip.cy.ts +++ b/packages/components/cypress/e2e/tooltip.cy.ts @@ -4,7 +4,7 @@ describe('tooltips', { baseUrl: null, includeShadowDom: true }, () => { cy.visit('./cypress/fixtures/post-tooltip.test.html'); cy.get('#target1').as('target1'); cy.get('#target2').as('target2'); - cy.get('#tooltip-one').find('div[popover]').as('tooltip'); + cy.get('#tooltip-one').find('post-popovercontainer[popover]').as('tooltip'); }); it('should display a tooltip', () => { @@ -54,7 +54,7 @@ describe('tooltips', { baseUrl: null, includeShadowDom: true }, () => { cy.visit('./cypress/fixtures/post-tooltip.test.html'); cy.get('#target-child-element').as('target'); cy.get('#target-child-element span').as('target-child'); - cy.get('#tooltip-one').find('div[popover]').as('tooltip'); + cy.get('#tooltip-one').find('post-popovercontainer[popover]').as('tooltip'); }); it('should show tooltip on hovered child element', () => { diff --git a/packages/components/cypress/fixtures/post-popover.test.html b/packages/components/cypress/fixtures/post-popover.test.html index 582db23746..23d880fb52 100644 --- a/packages/components/cypress/fixtures/post-popover.test.html +++ b/packages/components/cypress/fixtures/post-popover.test.html @@ -9,7 +9,7 @@
This is a test
+This is a test