Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popover element is not closed when clicking outside on a Select element #10817

Closed
2 of 6 tasks
y-elouri opened this issue Nov 20, 2024 · 3 comments
Closed
2 of 6 tasks
Labels
0 - new New issues that need assignment. ArcGIS Web Analysis Issues logged by ArcGIS Web Analysis team members bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. spike complete Issues that have a research spike completed and dev work can proceed

Comments

@y-elouri
Copy link

y-elouri commented Nov 20, 2024

Check existing issues

Actual Behavior

<calcite-popover auto-close> does not close when clicking outside on a <calcite-select> element. This happens only on Safari.

Expected Behavior

The popover should be closed as the click was initiated outside.

Reproduction Sample

https://codepen.io/yelouri/pen/dyxBWjX

Reproduction Steps

  1. Click on the caret of the element with Offset distance placeholder
  2. Two choices:
    2.a. click in any blank space outside ==> popover is closed ✅
    2.b. click on the caret of the first dropdown ==> popover remains open ❌
Screenshot 2024-11-20 at 11 06 46 AM

Reproduction Version

2.13.0

Relevant Info

Browsers affected: Safari,

*Chrome & Firefox seems OK, but there's a flashing that happens on the <calcite-select> element.

Regression?

No response

Priority impact

impact - p3 - not time sensitive

Impact

https://devtopia.esri.com/WebGIS/arcgis-web-analysis/issues/7549

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/calcite-ui-icons
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Web Analysis

@y-elouri y-elouri added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Nov 20, 2024
@github-actions github-actions bot added ArcGIS Web Analysis Issues logged by ArcGIS Web Analysis team members calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive labels Nov 20, 2024
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. and removed 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Dec 18, 2024
@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Jan 23, 2025
@jcfranco
Copy link
Member

jcfranco commented Jan 23, 2025

Spike findings:

1. <calcite-popover> not closing in Safari when clicking <calcite-select>

This is caused by a browser bug that prevents pointerup, mouseup and click from firing, which prevents PopoverManager from toggling popovers.

2. Sudden closing of <calcite-select> in Chrome and Firefox

This is caused by focus-trap moving focus back to the previously focused element. This happens with the native <select> too when focus shifts to another element while open (see example). For reference, #10682 will explore options to improve this behavior.

Unfortunately, I don't think we can do anything about 1, and 2 will be addressed in a separate issue.

cc @driskull

@jcfranco jcfranco added the spike complete Issues that have a research spike completed and dev work can proceed label Jan 23, 2025
@github-actions github-actions bot added 0 - new New issues that need assignment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. 2 - in development Issues that are actively being worked on. labels Jan 23, 2025
Copy link
Contributor

cc @geospatialem, @brittneytewks

@geospatialem
Copy link
Member

Closing the above based on Franco's response above detailing the browser bug, outside of Calcite's control, and some opportunities for improvement with popover with #10682.

@geospatialem geospatialem closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Web Analysis Issues logged by ArcGIS Web Analysis team members bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. spike complete Issues that have a research spike completed and dev work can proceed
Projects
None yet
Development

No branches or pull requests

3 participants