siemens / ix

Siemens Industrial Experience is a design system for designers and developers, to consistently create the perfect digital experience for industrial software products.
https://ix.siemens.io/
MIT License
205 stars 69 forks source link

Dropdown change detection invocations even if closed #1513

Open KarimM7mad opened 1 month ago

KarimM7mad commented 1 month ago

Prerequisites

What happened?

I am facing an issue with IX-dropdown in ix v2.4 with Angular v16

checkout this stack blitz example to know more

  1. open the following stackblitz example https://stackblitz.com/~/github.com/KarimM7mad/ix-dropdown-change-detection-issue-v16

  2. open the stackblitz's run in a new tab and connect the tab to the project

  3. open the console (I have a console log that detect change detections invocations, which will print if a CD occurs and how long did it take)

  4. scroll down till the button (triggering the dropdown) disappears from the viewport

  5. you will notice that no change detections occurs as you didn't interact with the dropdown.

  6. scroll to top

  7. click on the button to show the dropdown, and keep it open.

  8. scroll down till the opened dropdown disappears from the viewport.

  9. look at the console, you will find change detections invoked on scrolling, which is expected.

  10. Now, don't make any scrolling and click anywhere to close the dropdown.

  11. scroll up and down in the page.

Expected:

Actual

github-actions[bot] commented 1 month ago

🤖 Hello @KarimM7mad

Your issue will be analyzed and is part of our internal workflow. To get informed about our workflow please checkout the Contributing Guidelines

JIRA: IX-1832