Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Fix broken growth behavior #61

Closed
wants to merge 1 commit into from
Closed

Fix broken growth behavior #61

wants to merge 1 commit into from

Conversation

andybons
Copy link

@andybons andybons commented Dec 9, 2015

white-space: pre-wrap is added to preserve whitespace within the mirror. This was causing long lines without line breaks break in the <textarea> not in the mirror div.

@@ -47,7 +47,6 @@
position: relative;
width: 400px;
border: 1px solid;
padding: 2px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing this padding renders the text and the cursor outside the border.

Before (in https://elements.polymer-project.org/elements/iron-autogrow-textarea?view=demo:demo/index.html&active=iron-autogrow-textarea):
screen shot 2015-12-14 at 2 58 24 pm

Locally, with your code:
screen shot 2015-12-14 at 2 58 31 pm

Copy link
Author

Choose a reason for hiding this comment

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

Removed this portion.

@notwaldorf
Copy link
Contributor

I'm not sure how to reproduce the original bug, and your fix. Is it #32?

Also, since this seems pretty subtle, is there any chance you can add a test?

@notwaldorf notwaldorf self-assigned this Dec 14, 2015
@andybons
Copy link
Author

Working on a test.

@andybons
Copy link
Author

andybons commented Jan 8, 2016

giphy-1

Was my issue all along.

@andybons andybons closed this Jan 8, 2016
@notwaldorf
Copy link
Contributor

I can't find a good reaction gif, so here's a dog being scared of a chicken:

@andybons andybons deleted the andybons/grow branch January 8, 2016 13:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants