GAUD-9162: Fixes the drag-and-drop tooltip issue#6745
Open
EdwinACL831 wants to merge 1 commit intomainfrom
Open
GAUD-9162: Fixes the drag-and-drop tooltip issue#6745EdwinACL831 wants to merge 1 commit intomainfrom
EdwinACL831 wants to merge 1 commit intomainfrom
Conversation
- 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
Contributor
|
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
Note The build needs to finish before your changes are deployed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Fix
Initially it was believed that the issue was directly linked to the
repeatLit'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 aredisconnectedand thenconnected, their respective web components life cycle method were being triggered:disconnectedCallbackandconnectedCallbackrespectively.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.