Skip to content

bug(text field): Long multiline text field - scrolled up on input  #20255

Closed
@kissds

Description

@kissds

Reproduction

https://monosnap.com/file/mKU40IcGQvhrgnhN9U3TLpAeouTj2g

Steps to reproduce:

  1. open https://v9.material.angular.io/cdk/text-field/examples in ie11
  2. find example "Auto-resizing textarea"
  3. inspect text field in the bottom of page
  4. uncheck element.style max-height (or you can try to reproduce it without cdkAutosizeMaxRows)
  5. insert very long text into the text field (about 50 lines) - height of content must to be higher than viewport's height
  6. put the cursor on the third line from the end (not on last line)
  7. enter some letter

Expected Behavior

The cursor and the letter just entered remain in the viewport.

Actual Behavior

The scroll moved up to the top of textarea

Environment

  • Angular: 9.1.0
  • CDK/Material: 9.2.4 and 10.0.0
  • Browser(s): ie11
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: cdk/text-fieldhelp wantedThe team would appreciate a PR from the community to address this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions