Skip to content

Commit ba8ad89

Browse files
committed
use: 'querySelectorAll' in el
1 parent b266575 commit ba8ad89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web_src/js/modules/tippy.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ export function initGlobalTooltips() {
103103
const observer = new MutationObserver((mutationList) => {
104104
for (const mutation of mutationList) {
105105
if (mutation.type === 'childList') {
106+
// mainly for Vue components and AJAX rendered elements
106107
for (const el of mutation.addedNodes) {
107108
// handle all "tooltip" elements in added nodes which have 'querySelectorAll' method, skip non-related nodes (eg: "#text")
108-
if (el.querySelectorAll) {
109+
if ('querySelectorAll' in el) {
109110
attachChildrenLazyTooltip(el);
110111
}
111112
}

0 commit comments

Comments
 (0)