History

Use pointer-events w/o fallback

https://caniuse.com/pointer-events

Simon Legner committed 2 years ago

Commit fe329d61 parent aeb9f801 file · +0 −13Browse files

Unified · Split

assets/javascripts/views/sidebar/sidebar_hover.js+0−13
@@ -12,13 +12,6 @@ app.views.SidebarHover = class SidebarHover extends app.View { · 11 unmodified lines
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 { · 90 unmodified lines
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−};