From 56652eb6cec92d2a176a122899549e13a0cc1e4f Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Tue, 13 Aug 2019 19:50:22 +0200 Subject: [PATCH] Remove redundant call to clearTimeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I was working on https://github.com/mui-org/material-ui/issues/16976, by luck, the concern was already taking care of in https://github.com/WICG/focus-visible/issues/167. In the process of applying the diff, I have found this strange call to clearTimeout—I believe it's not needed. --- src/focus-visible.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/focus-visible.js b/src/focus-visible.js index 92f3319..0d7b3ed 100644 --- a/src/focus-visible.js +++ b/src/focus-visible.js @@ -168,7 +168,6 @@ function applyFocusVisiblePolyfill(scope) { window.clearTimeout(hadFocusVisibleRecentlyTimeout); hadFocusVisibleRecentlyTimeout = window.setTimeout(function() { hadFocusVisibleRecently = false; - window.clearTimeout(hadFocusVisibleRecentlyTimeout); }, 100); removeFocusVisibleClass(e.target); }