Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Commit

Permalink
chore(text-field): Remove ripple class for outlined text-field (#754)
Browse files Browse the repository at this point in the history
As per recent upstream decision.

> Justifications:
> * It's awkward to see a ripple when clicking/tapping inside an already-focused text field with the sole intent of relocating the cursor or selecting text
> * There are already enough other visual indicators, e.g. the line ripple (which also animates based on the pointer's X coordinate), and the addition of focus shade when initially focusing a text field

reference: material-components/material-components-web#2354
  • Loading branch information
trimox authored Mar 8, 2018
1 parent d2158f0 commit 6ed2887
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/lib/textfield/outline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import {
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import { MdcRipple } from '@angular-mdc/web/ripple';

import { MDCTextFieldOutlineAdapter } from '@material/textfield/outline/adapter';
import { MDCTextFieldOutlineFoundation } from '@material/textfield/outline';

Expand All @@ -32,8 +30,7 @@ export class MdcTextFieldIdleOutline {
</svg>
`,
encapsulation: ViewEncapsulation.None,
preserveWhitespaces: false,
providers: [MdcRipple],
preserveWhitespaces: false
})
export class MdcTextFieldOutline implements OnInit, OnDestroy {
private _idleOutline: MdcTextFieldIdleOutline;
Expand Down Expand Up @@ -65,20 +62,14 @@ export class MdcTextFieldOutline implements OnInit, OnDestroy {

constructor(
private _renderer: Renderer2,
public elementRef: ElementRef,
private _ripple: MdcRipple) {
this._ripple.init();
}
public elementRef: ElementRef) { }

ngOnInit(): void {
this.foundation = new MDCTextFieldOutlineFoundation(this._mdcAdapter);
this.foundation.init();

this._ripple.init();
}

ngOnDestroy(): void {
this._ripple.destroy();
this.foundation.destroy();
}

Expand Down

0 comments on commit 6ed2887

Please sign in to comment.