Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 13, 2020

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented May 3, 2020

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
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
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
Copy link
Contributor

@mmalerba mmalerba left a comment

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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autosized textarea is unable to Undo on Firefox
3 participants