Skip to content

fix(text-field): unable to undo/redo in autosized text field on firefox - #19238

Merged
mmalerba merged 1 commit into
angular:masterfrom
crisbeto:16629/autosize-textarea-firefox
May 13, 2020
Merged

mmalerba merged 1 commit into
angular:masterfrom
crisbeto:16629/autosize-textarea-firefox

Conversation

@crisbeto

@crisbeto crisbeto commented May 3, 2020

Copy link
Copy Markdown
Member

When we're measuring the height of an autosized textarea, we apply a class that has overflow: hidden. The overflow declaration seems to hit a bug on Firefox that doesn't allow users to undo/redo what they've typed. These changes add a specific workaround for Firefox.

Fixes #16629.

When we're measuring the height of an autosized textarea, we apply a class that has `overflow: hidden`. The `overflow` declaration seems to hit a bug on Firefox that doesn't allow users to undo/redo what they've typed. These changes add a specific workaround for Firefox.

Fixes angular#16629.
@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release labels May 3, 2020
@crisbeto
crisbeto requested a review from mmalerba as a code owner May 3, 2020 11:04
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 3, 2020
// because the measurements there don't seem to be affected by the `height: 0`, whereas on other
// browsers they are, e.g. Chrome detects longer text and IE does't resize back to normal.
// Identical issue report: https://bugzilla.mozilla.org/show_bug.cgi?id=448784
textarea.cdk-textarea-autosize-measuring-firefox {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think overflow:hidden was there because it prevented scrollbars from messing up the calculation. Have you confirmed if this is a problem on firefox now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seemed to behave correctly when I was testing it out in the dev app. I was trying both the one that's on a plain textarea, as well as the one in the form field.

@mmalerba mmalerba added lgtm action: merge The PR is ready for merge by the caretaker labels May 5, 2020

@mmalerba mmalerba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmalerba
mmalerba merged commit a586f02 into angular:master May 13, 2020
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Jun 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release

3 participants