From 1e92545465e3d9eb1ac47642669de2a30e4cdbd4 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 8 Jun 2017 23:33:14 +0200 Subject: [PATCH] fix(button-toggle): remove redundant blocking touchstart listener (#4947) Removes an unnecessary `touchstart` listener on the button toggle. It was initially added to prevent it from capturing user events, however it's no longer necessary, because we have `pointer-events: none` on the element. This also fixes a warning that is being logged by Chrome. Fixes #4221. --- src/lib/button-toggle/button-toggle.html | 3 +-- src/lib/button-toggle/button-toggle.scss | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/button-toggle/button-toggle.html b/src/lib/button-toggle/button-toggle.html index fffdfa7c3e2..37f59129ccb 100644 --- a/src/lib/button-toggle/button-toggle.html +++ b/src/lib/button-toggle/button-toggle.html @@ -12,5 +12,4 @@ - -
+
diff --git a/src/lib/button-toggle/button-toggle.scss b/src/lib/button-toggle/button-toggle.scss index 4660cb46fe9..17168e064cc 100644 --- a/src/lib/button-toggle/button-toggle.scss +++ b/src/lib/button-toggle/button-toggle.scss @@ -55,11 +55,11 @@ $mat-button-toggle-border-radius: 2px !default; vertical-align: middle; } -// Overlay to be used as a tint. Note that the same effect can be achieved by using a pseudo -// element, however we use a proper DOM element in order to be able to disable the default -// touch action. This makes the buttons more responsive on touch devices. +// Overlay to be used as a tint. .mat-button-toggle-focus-overlay { border-radius: inherit; + + // Disable pointer events to prevent it from hijacking user events. pointer-events: none; opacity: 0; @include mat-fill;