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

ld-select popper element remains open on page navigation #389

Closed
borisdiakur opened this issue Jul 26, 2022 · 1 comment · Fixed by #390
Closed

ld-select popper element remains open on page navigation #389

borisdiakur opened this issue Jul 26, 2022 · 1 comment · Fixed by #390
Labels
bug An issue describing unexpected or malicious behaviour. confirmed This label indicates that the issue has been reproduced and verified by the core team. released

Comments

@borisdiakur
Copy link
Contributor

borisdiakur commented Jul 26, 2022

Bug description

I'm using ld-select and when the dropdown opens and then I click on a different page before closing it, the same dropdown carries and overlays in the next page.
So I clicked on this dropdown and did not close this and moved to some other page.

So the previous dropdown overlays in this page

I'm not sure if this bug is because of my code or everybody has this issue. Your help is much appreciated. Thanks

Steps to reproduce the behavior

After investigating this issue I found out that calling the destroy method on the popper element was not enough to close it during the execution of the disconnectedCallback component life cycle method. However, explicitly removing the popper element after destruction in the disconnectedCallback method resolves the issue. Steps to reproduce are:

  1. Go to https://emdgroup-liquid.github.io/liquid/components/ld-select/
  2. Open the first ld-select element via click.
  3. Execute the following in the developer tools console: $('ld-select').remove()

Expected behavior

ld-select popper element closes on page navigation.

Actual behavior

ld-select popper element remains open on page navigation.

@borisdiakur borisdiakur added bug An issue describing unexpected or malicious behaviour. needed: replication This label indicates that a bug has been reported, but has not been successfully replicated yet. confirmed This label indicates that the issue has been reproduced and verified by the core team. in progress This label indicates that the issue is currently being worked on. and removed needed: replication This label indicates that a bug has been reported, but has not been successfully replicated yet. labels Jul 26, 2022
renet pushed a commit that referenced this issue Jul 27, 2022
github-actions bot pushed a commit that referenced this issue Jul 27, 2022
# [2.4.0](v2.3.1...v2.4.0) (2022-07-27)

### Bug Fixes

* **ld-select:** remove popper in disconnected callback ([20e92f8](20e92f8)), closes [#389](#389)
* **ld-tooltip:** remove popper in disconnected callback ([b59c123](b59c123))

### Features

* **ld-button:** add danger-secondary mode ([edc52ae](edc52ae))
* **ld-select:** add filter feature ([b6a84ee](b6a84ee)), closes [#238](#238)
* **ld-stepper:** add interaction styles ([f1a6a66](f1a6a66))
* **ld-stepper:** add progress indicator component ([8cdd327](8cdd327))
* **ld-tabs:** floating mode ([0d8f4f4](0d8f4f4))
@borisdiakur
Copy link
Contributor Author

🎉 This issue has been resolved in version 2.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@borisdiakur borisdiakur added released done and removed in progress This label indicates that the issue is currently being worked on. labels Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue describing unexpected or malicious behaviour. confirmed This label indicates that the issue has been reproduced and verified by the core team. released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant