diff --git a/src/material/input/input.ts b/src/material/input/input.ts index b286d3aad979..5b45db32da37 100644 --- a/src/material/input/input.ts +++ b/src/material/input/input.ts @@ -214,7 +214,6 @@ export class MatInput return this._type; } set type(value: string) { - const prevType = this._type; this._type = value || 'text'; this._validateType(); @@ -224,10 +223,6 @@ export class MatInput if (!this._isTextarea && getSupportedInputTypes().has(this._type)) { (this._elementRef.nativeElement as HTMLInputElement).type = this._type; } - - if (this._type !== prevType) { - this._ensureWheelDefaultBehavior(); - } } protected _type = 'text'; @@ -610,33 +605,6 @@ export class MatInput } }; - private _webkitBlinkWheelListener = (): void => { - // This is a noop function and is used to enable mouse wheel input - // on number inputs - // on blink and webkit browsers. - }; - - /** - * In blink and webkit browsers a focused number input does not increment or decrement its value - * on mouse wheel interaction unless a wheel event listener is attached to it or one of its - * ancestors or a passive wheel listener is attached somewhere in the DOM. For example: Hitting - * a tooltip once enables the mouse wheel input for all number inputs as long as it exists. In - * order to get reliable and intuitive behavior we apply a wheel event on our own thus making - * sure increment and decrement by mouse wheel works every time. - * @docs-private - */ - private _ensureWheelDefaultBehavior(): void { - this._cleanupWebkitWheel?.(); - - if (this._type === 'number' && (this._platform.BLINK || this._platform.WEBKIT)) { - this._cleanupWebkitWheel = this._renderer.listen( - this._elementRef.nativeElement, - 'wheel', - this._webkitBlinkWheelListener, - ); - } - } - /** Gets the value to set on the `readonly` attribute. */ protected _getReadonlyAttribute(): string | null { if (this._isNativeSelect) {