Skip to content

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

@rpanichakit9541

Description

@rpanichakit9541

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

Metadata

Metadata

Labels

4 - verifiedIssues that have been tested, confirmed as mitigated, and are ready to close.ArcGIS OnlineIssues logged by ArcGIS Online team members.bugBug reports for broken functionality. Issues should include a reproduction of the bug.calcite-componentsIssues specific to the @esri/calcite-components package.impact - p3 - not time sensitiveUser set priority impact status of p3 - not time sensitivep - mediumIssue is non core or affecting less that 60% of people using the libraryspike completeIssues that have a research spike completed and dev work can proceed

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions