Skip to content

bug: hide caret shim does not properly remove itself #26807

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

Closed
4 of 8 tasks
joewoodhouse opened this issue Feb 16, 2023 · 2 comments
Closed
4 of 8 tasks

bug: hide caret shim does not properly remove itself #26807

joewoodhouse opened this issue Feb 16, 2023 · 2 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@joewoodhouse
Copy link
Contributor

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • v7.x
  • Nightly

Current Behavior

The shim for hiding the caret on scroll (detailed here https://github.com/ionic-team/ionic-framework/wiki/Utilities#hide-caret) does not remove itself properly, leaving an attached event listener on the ion-content object, which means it is never free/released by the GC

Expected Behavior

The shim should properly remove itself from the element

Steps to Reproduce

Setup

  • Add an inside of an element
  • Remove then ion-input and the ion-content

Analysis

Take a snapshot of the heap. You will see a "Detached HTMLElement" in the objects relating to the ion-content object. In the list of retainers you will see the hide-caret shims

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.20.6

Utility:

cordova-res : not installed globally
native-run : 1.7.1

System:

NodeJS : v16.14.2
npm : 8.7.0
OS : macOS

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Feb 16, 2023
@liamdebeasi liamdebeasi self-assigned this Feb 16, 2023
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Feb 16, 2023
@liamdebeasi liamdebeasi removed their assignment Feb 16, 2023
@ionitron-bot ionitron-bot bot removed the triage label Feb 16, 2023
@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #26808, and a fix will be available in an upcoming release of Ionic Framework. Thanks for the PR!

@ionitron-bot
Copy link

ionitron-bot bot commented Mar 18, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

2 participants