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

[calcite-dropdown] odd behavior when inside a scrollable container #8685

Closed
2 of 6 tasks
rpanichakit9541 opened this issue Feb 1, 2024 · 5 comments
Closed
2 of 6 tasks
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online 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 p - medium Issue is non core or affecting less that 60% of people using the library spike complete Issues that have a research spike completed and dev work can proceed

Comments

@rpanichakit9541
Copy link
Contributor

Check existing issues

Actual Behavior

calcite-dropdown is not shown correctly when it's started as opened below the fold inside a scrollable container. If I click the button at this point nothing will happen, the dropdown will open if I click it a second time. A side note, if I scroll the container after the dropdown shows up it will stay fixed in that position even if I scrollwheel the trigger button out of view.

Expected Behavior

  • The dropdown should display as opened correctly even if it's started out of view inside a scrollable container
  • The dropdown should stay together with the trigger button when I use the mousewheel to scroll the container

Reproduction Sample

https://codepen.io/rpanichakit/pen/vYPRVQN?editors=1000

Reproduction Steps

  1. open the Codepen link https://codepen.io/rpanichakit/pen/vYPRVQN?editors=1000
  2. scroll the div with the orange background down to the bottom
  3. observe that the dropdown is not shown even though it has open prop set
  4. click the trigger button once and see that nothing happens
  5. click the trigger button again and see the dropdown shows up
  6. use the mousewheel to scroll the div up and down to see the dropdown stay put while the trigger scrolls away.

Reproduction Version

2.4.0

Relevant Info

No response

Regression?

No response

Priority impact

p4 - not time sensitive

Impact

No response

Calcite package

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

Esri team

ArcGIS Online

@rpanichakit9541 rpanichakit9541 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 Feb 1, 2024
@github-actions github-actions bot added impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive ArcGIS Online Issues logged by ArcGIS Online team members. calcite-components Issues specific to the @esri/calcite-components package. labels Feb 1, 2024
@jcfranco jcfranco added the spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. label Feb 29, 2024
@jcfranco jcfranco added needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Feb 29, 2024
@driskull
Copy link
Member

If we call connectFloatingUI again in componentDidLoad this seems to be fixed.

We would probably need to do that for all FloatingUI components so that these scrolling listeners are setup correctly. We need to maintain the call in connectedCallback as well for when an element is just moved in the DOM.

@jcfranco if this sounds good I can proceed.

since connectFloatingUI is also called when the reference and floating elements are created, maybe we should debounce the call to connectFloatingUI as well?

driskull added a commit that referenced this issue Mar 20, 2024
connect floatingUI elements once a component has loaded to correctly setup auto update events
@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels Mar 20, 2024
@jcfranco jcfranco added this to the 2024-03-26 - Mar Release milestone Mar 20, 2024
@jcfranco jcfranco added p - medium Issue is non core or affecting less that 60% of people using the library spike complete Issues that have a research spike completed and dev work can proceed and removed needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. labels Mar 20, 2024
@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 2 - in development Issues that are actively being worked on. labels Mar 20, 2024
@github-actions github-actions bot removed this from the 2024-03-26 - Mar Release milestone Mar 20, 2024
Copy link
Contributor

cc @geospatialem, @brittneytewks

@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. labels Mar 20, 2024
@jcfranco jcfranco added this to the 2024-03-26 - Mar Release milestone Mar 20, 2024
@jcfranco
Copy link
Member

Assigning to this milestone as @driskull has a PR ready. cc @geospatialem

driskull added a commit that referenced this issue Mar 21, 2024
…container (#8973)

**Related Issue:** #8685

## Summary

- Connect floatingUI elements once a component has loaded to correctly
setup auto update events
- Automatically call `reposition` inside `connectFloatingUI` for
consistency
@driskull driskull removed their assignment Mar 21, 2024
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Mar 21, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented Mar 22, 2024

Verified on 2.7.0-next.14

@jcfranco @driskull
Note: the behavior mentioned in the issue is resolved but I want to bring attention to the clunky visuals that happen when scrolling up. Not sure if there's anything we can do about it but in case there is, here's a video:

Screen.Recording.2024-03-22.at.1.29.13.PM.mov

@DitwanP DitwanP closed this as completed Mar 22, 2024
@DitwanP DitwanP added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online 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 p - medium Issue is non core or affecting less that 60% of people using the library spike complete Issues that have a research spike completed and dev work can proceed
Projects
None yet
Development

No branches or pull requests

5 participants