Merge pull request #2806 from brkcvn/master

Tooltip & Popper console error fixed
This commit is contained in:
Burak Civan 2022-12-09 15:49:14 +03:00 committed by GitHub
commit 9681e9fcd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -252,42 +252,45 @@ function runTooltip(tooltipToggleEl) {
} else {
tooltipEl.classList.add("opacity-100", "visible");
}
// Enable the event listeners
popperInstance.setOptions((options) => ({
...options,
modifiers: [
...options.modifiers,
{
name: "eventListeners",
enabled: true,
},
],
})); // Update its position
popperInstance.update();
}
// Enable the event listeners
popperInstance.setOptions((options) => ({
...options,
modifiers: [
...options.modifiers,
{
name: "eventListeners",
enabled: true,
},
],
})); // Update its position
popperInstance.update();
}
function hide() {
// Hide the tooltip
if (tooltipEl.classList.contains("opacity-100", "visible")) {
tooltipEl.classList.remove("opacity-100", "visible");
} else {
tooltipEl.classList.add("opacity-0", "invisible");
}
// Disable the event listeners
if (tooltipEl !== null) {
// Hide the tooltip
if (tooltipEl.classList.contains("opacity-100", "visible")) {
tooltipEl.classList.remove("opacity-100", "visible");
} else {
tooltipEl.classList.add("opacity-0", "invisible");
}
// Disable the event listeners
popperInstance.setOptions((options) => ({
...options,
modifiers: [
...options.modifiers,
{
name: "eventListeners",
enabled: false,
},
],
}));
popperInstance.setOptions((options) => ({
...options,
modifiers: [
...options.modifiers,
{
name: "eventListeners",
enabled: false,
},
],
}));
}
}
var showEvents = [];