Skip to content

Commit 02716b7

Browse files
committed
Fixed #2260 user callback on text Hints
1 parent 3dd4302 commit 02716b7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/content_scripts/common/hints.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,13 @@ div.hint-scrollable {
436436
_onHintKey(elm);
437437
}
438438
} else {
439-
dispatchSKEvent('user', ["onHintClicked"], elm);
439+
if (elm.constructor.name === "Array") {
440+
// remove Text Node from elm as it cannot be transitted across JS scope
441+
elm[0] = null;
442+
dispatchSKEvent('user', ["onHintClicked", elm]);
443+
} else {
444+
dispatchSKEvent('user', ["onHintClicked"], elm);
445+
}
440446
}
441447
if (behaviours.multipleHits) {
442448
prefix = "";

0 commit comments

Comments
 (0)