Skip to content

Commit fe329d6

Browse files
committed
Use pointer-events w/o fallback
https://caniuse.com/pointer-events
1 parent aeb9f80 commit fe329d6

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

assets/javascripts/views/sidebar/sidebar_hover.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ app.views.SidebarHover = class SidebarHover extends app.View {
1212

1313
static routes = { after: "onRoute" };
1414

15-
constructor(el) {
16-
super(el);
17-
if (!isPointerEventsSupported()) {
18-
delete this.constructor.events.mouseover;
19-
}
20-
}
21-
2215
show(el) {
2316
if (el !== this.cursor) {
2417
this.hide();
@@ -115,9 +108,3 @@ app.views.SidebarHover = class SidebarHover extends app.View {
115108
this.hide();
116109
}
117110
};
118-
119-
var isPointerEventsSupported = function () {
120-
const el = document.createElement("div");
121-
el.style.cssText = "pointer-events: auto";
122-
return el.style.pointerEvents === "auto";
123-
};

0 commit comments

Comments
 (0)