Detached elements from WjTooltip and FlexGrid

Posted by: taran.twomey on 20 February 2024, 2:04 pm EST

  • Posted 20 February 2024, 2:04 pm EST

    While performing memory profiling and understanding our app’s disposal of elements that are no longer in use, some inconsistencies arose around detached elements. Specifically related to WjTooltip and its use with the FlexGrid. We use a number of event listeners to handle programmatically hiding and showing a tooltip instance, rather than attaching it to each element within a grid individually. These event listeners are managed by Renderer2, which gives us access to destructor methods to safely remove them on disposal.

    When disposing of the grid - after we’ve shown a tooltip - the tooltip seems to get stuck as a detached element, even after garbage collection is forced to run. How do we properly dispose of the tooltip to ensure that we have no detached elements after disposal?

    The below demo showcases the issue, which can best be seen using tools such as the detached elements view in Edge.

    demo: https://jscodemine.mescius.io/sample/3ndzWndjaU28hTwgoQuD6g/

  • Posted 21 February 2024, 10:43 pm EST

    Hi Taran,

    Thank you for sharing the sample, we are able to replicate the issue on our end and it seems like an unexpected behavior for the Tooltip control, so we have forwarded this issue to the dev team for further investigation with internal tracking ID - WJM-33479. We will update you as soon as we have an update from the dev team.

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels