-
Notifications
You must be signed in to change notification settings - Fork 16
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
IBX-4005: Broken tooltips.hideAll() function #599
Conversation
@@ -132,6 +132,8 @@ | |||
</div>`, | |||
}); | |||
|
|||
tooltipNode.title = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain how it works? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were always using [title]
selector to get all nodes for tooltips, both for parsing and hiding all tooltips. So far Bootstrap was using .setAttribute('title', '')
in its constructor, but in 5.2.0 they introduced .removeAttribute('title')
instead, which removed title
parameter, I set it back here, so that I could still use same selector for getting all tooltips
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really appreciate your explanation! 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you parse
a second time the same tooltipNode and title is the empty string will bootstrap change the tooltip to empty string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not anymore, after last commit ;)
|
||
tooltipNode.dataset.originalTitle = tooltipNode.title; | ||
tooltipNode.dataset.originalTitle = tooltipInstance ? tooltipInstance._getTitle() : tooltipNode.title; | ||
|
||
new bootstrap.Tooltip(tooltipNode, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are creating a tooltip instance even in a case in which tooltipInstance
returned by getInstance
is not null
? Isn't this the duplication of instances? 🤔
Kudos, SonarCloud Quality Gate passed!
|
In case of testing it on main branch, it requires new installation with fixed tag for admin-ui-assets (wrong BS version installed)
Checklist:
$ composer fix-cs
)