From fe329d6aaeb1c514c79fa66bcdb938f85ca73405 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 6 Jan 2024 17:51:22 +0100 Subject: [PATCH] Use pointer-events w/o fallback https://caniuse.com/pointer-events --- assets/javascripts/views/sidebar/sidebar_hover.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/assets/javascripts/views/sidebar/sidebar_hover.js b/assets/javascripts/views/sidebar/sidebar_hover.js index 439a35dd..34f501c5 100644 --- a/assets/javascripts/views/sidebar/sidebar_hover.js +++ b/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"; -};