Skip to content

GAUD-9162: Fixes the drag-and-drop tooltip issue#6745

Open
EdwinACL831 wants to merge 1 commit intomainfrom
ecollazos/GAUD-9162_d2l_tooltip_disconnects
Open

GAUD-9162: Fixes the drag-and-drop tooltip issue#6745
EdwinACL831 wants to merge 1 commit intomainfrom
ecollazos/GAUD-9162_d2l_tooltip_disconnects

Conversation

@EdwinACL831
Copy link
Copy Markdown
Contributor

@EdwinACL831 EdwinACL831 commented Apr 1, 2026

Jira Ticket

GAUD-9162

Issue

This was happening when a list was being reordered manually (using drag-and-drop) or by sorting it using another way.
List items with an associated tooltip, were not displaying its respective tooltip after the reordering process.

GAUD-9162_hd_issue

Fix

Initially it was believed that the issue was directly linked to the repeat Lit's directive. After reproducing and understanding what was happening, I realized that the real problem was relying in the listeners. During the reordering process, since the components are disconnected and then connected, their respective web components life cycle method were being triggered: disconnectedCallback and connectedCallback respectively.

within the first method, we were removing all the component's listeners which handle all the events that show the tooltip. And in the second method we are not adding them back, so the tooltip was not listening to any of the events that make it to appear.

  • Adds the this.#addListeners method when the component is being connected to the DOM.
  • Adds new JS file only for demo purposes
  • Adds a new HTML demo to visually test it
  • Adds new unit test cases

GAUD-9162_hd_fix

- Adds the this.#addListeners method when the component is being
  connected to the DOM.
- Adds new JS file only for demo purposes
- Adds a new HTML demo to visually test it
- Adds new unit test cases
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-6745/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

@EdwinACL831 EdwinACL831 marked this pull request as ready for review April 1, 2026 19:19
@EdwinACL831 EdwinACL831 requested a review from a team as a code owner April 1, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant