فهرست منبع

Use pointer-events w/o fallback

https://caniuse.com/pointer-events
Simon Legner 1 سال پیش
والد
کامیت
fe329d6aae
1فایلهای تغییر یافته به همراه0 افزوده شده و 13 حذف شده
  1. 0 13
      assets/javascripts/views/sidebar/sidebar_hover.js

+ 0 - 13
assets/javascripts/views/sidebar/sidebar_hover.js

@@ -12,13 +12,6 @@ app.views.SidebarHover = class SidebarHover extends app.View {
 
   static routes = { after: "onRoute" };
 
-  constructor(el) {
-    super(el);
-    if (!isPointerEventsSupported()) {
-      delete this.constructor.events.mouseover;
-    }
-  }
-
   show(el) {
     if (el !== this.cursor) {
       this.hide();
@@ -115,9 +108,3 @@ app.views.SidebarHover = class SidebarHover extends app.View {
     this.hide();
   }
 };
-
-var isPointerEventsSupported = function () {
-  const el = document.createElement("div");
-  el.style.cssText = "pointer-events: auto";
-  return el.style.pointerEvents === "auto";
-};