Material: Text field (textarea): CMD+Z (undo) not working

Created on 24 Jan 2020  路  2Comments  路  Source: angular/material

Bug, enhancement request, or proposal:

Enable usage of CMD+Z in text field elements (textarea).

CodePen and steps to reproduce the issue:

CodePen Demo which demonstrates the issue:

https://material.angular.io/cdk/text-field/overview

Detailed Reproduction Steps:

  1. Type "Hello World" into the text field (Auto-resizing textarea)
  2. Press CMD+Z

What is the expected behavior?

Typing "Hello World" followed by pressing CMD+Z should undo the whole string, not single characters.
See HTML default behavior:
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea

On Angular Input Elements the behavior is working as expected.

What is the current behavior?

  • Nothing happens (Firefox)
  • Command removes single characters (Chrome).

What is the use-case or motivation for changing an existing behavior?

Advanced users use shortcuts and expect a textarea to behave like a textarea.

Which versions of AngularJS, Material, OS, and browsers are affected?

  • Angular: latest
  • Angular Material: latest
  • OS: Mac/Window (latest)
  • Browsers: Chrome, Firefox (latest)

Is there anything else we should know? Stack Traces, Screenshots, etc.

invalid

Most helpful comment

This repository/tracker is for AngularJS Material. You're likely looking for https://github.com/angular/components

All 2 comments

This repository/tracker is for AngularJS Material. You're likely looking for https://github.com/angular/components

Thanks @oliversalzburg
Moved issue to https://github.com/angular/components/issues/18287

Was this page helpful?
0 / 5 - 0 ratings