Skip to content

Commit cd1517a

Browse files
Inve1951Inve1951
Inve1951
authored and
Inve1951
committed
hover fix 1.0.2
1 parent 47dcf0b commit cd1517a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

plugins/autocompleteHoverFix.plugin.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ autocompleteHoverFix = class autocompleteHoverFix {
1515
}
1616

1717
getVersion() {
18-
return "1.0.1";
18+
return "1.0.2";
1919
}
2020

2121
start() {}
@@ -25,7 +25,7 @@ autocompleteHoverFix = class autocompleteHoverFix {
2525
load() {}
2626

2727
observer(m) {
28-
var e, node;
28+
var e, node, ref;
2929
try {
3030
({
3131
addedNodes: [node]
@@ -34,14 +34,17 @@ autocompleteHoverFix = class autocompleteHoverFix {
3434
e = error;
3535
return;
3636
}
37-
if (((node != null ? node.className : void 0) != null) && ((-1 !== node.className.indexOf("autocomplete-")) || -1 !== node.className.indexOf("popout-"))) {
37+
if ("function" === typeof (node != null ? (ref = node.className) != null ? ref.indexOf : void 0 : void 0) && ((-1 !== node.className.indexOf("autocomplete-")) || -1 !== node.className.indexOf("popout-"))) {
3838
e = document.createElement("div");
3939
e.style = "position: absolute;\nwidth: 100%;\nheight: 100%;\ntop: 0; left: 0;";
4040
e.onmousemove = function({clientX, clientY}) {
4141
if ((this.x != null) && (this.y != null) && (this.x !== clientX || this.y !== clientY)) {
4242
this.remove();
4343
e = document.elementFromPoint(clientX, clientY);
44-
while (e !== document.body) {
44+
while (true) {
45+
if (e === document.body) {
46+
return;
47+
}
4548
if (-1 !== e.className.indexOf("selectable-")) {
4649
e = e.parentNode;
4750
break;
@@ -50,9 +53,6 @@ autocompleteHoverFix = class autocompleteHoverFix {
5053
}
5154
e = e.parentNode;
5255
}
53-
if (e === document.body) {
54-
return;
55-
}
5656
e.dispatchEvent(new MouseEvent("mouseover", {
5757
clientX,
5858
clientY,

0 commit comments

Comments
 (0)