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

Cannot Wrap Textarea if in Fieldset Tag #48

Open
wesleyboar-fka-iosulfur opened this issue Oct 22, 2014 · 2 comments
Open

Cannot Wrap Textarea if in Fieldset Tag #48

wesleyboar-fka-iosulfur opened this issue Oct 22, 2014 · 2 comments

Comments

@wesleyboar-fka-iosulfur

There is a scenario where the affected textarea (and hidden pre tag) will expand to the width of its content, without wrapping.

Prerequisites:

  1. Any parent div of the affected textarea is a fieldset.
  2. Textarea content is one string of alphabetical/numerical characters, that is long enough to wrap.

Result:

Affected textarea (and hidden pre tag) will expand to a width as long as the content.

Problem:

Webkit puts a default style of min-width: -webkit-min-content; on a <fieldset>.

Personal Resolution:

  • For my project, I set min-width to 0 on the culprit fieldset.

Note:

Excellent plugin. Best I found, and there are many options.

@bgrins
Copy link
Owner

bgrins commented Oct 24, 2014

Sure enough, I see the same thing in Firefox on this page: http://jsfiddle.net/p206gmyo/2/

@ZaLiTHkA
Copy link

Looks like there hasn't been any work done on this project for quite a while; has it been abandoned? Either way, just for future reference...

I recently ran into this same issue, but I don't think it's really something that can be "fixed" in this project directly. A nice solution (as explained in this SO answer), is to add the following rules to your application:

fieldset {
  min-width: 0; // for webkit browsers
  display: table-cell; // for gecko browsers
}

Obviously, there are some IE caveats here, but that's also explained in the SO answer linked above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants