Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(button-toggle): remove redundant blocking touchstart listener #4947

Merged
merged 1 commit into from
Jun 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/lib/button-toggle/button-toggle.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@
<ng-content></ng-content>
</div>
</label>
<!-- the touchstart handler prevents the overlay from capturing the initial tap on touch devices -->
<div class="mat-button-toggle-focus-overlay" (touchstart)="$event.preventDefault()"></div>
<div class="mat-button-toggle-focus-overlay"></div>
6 changes: 3 additions & 3 deletions src/lib/button-toggle/button-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down