Closed Bug 648253 Opened 9 years ago Closed 9 years ago

Resizing textarea in a fieldset ignores max-width set in %

Categories

(Core :: DOM: CSS Object Model, defect)

2.0 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 504622

People

(Reporter: maxkotp, Unassigned)

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0

I am resizing a textarea with the resize grip. The textarea has max-width property set to 75% and it is nested a field set with max-width set to 75%. The textarea grows to 75% of the fieldset but as soon as the resize grip it taken out of fieldset width, the fieldset grows unlimitedly.

Reproducible: Always

Steps to Reproduce:
Test page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>HTML sandbox page</title>
    <style type="text/css">
        form
        {
            border: 1px solid Black;
            border-collapse: collapse;
            width: 75%;
            max-width: 75%;
        }
        textarea
        {
            max-width: 75%;
        }
        fieldset
        {
            max-width: 75%;
        }
    </style>
  </head>
  <body>
    <form action="about:blank method="get">
      <fieldset>
        <legend>Field set</legend>
        <textarea rows="25" cols="80" name="param">
        
        </textarea>
      </fieldset>
    </form>
  </body>
</html>

1. Grab resize grip
2. Drag it to the right.
3. Drag it to the right past fieldset border.
Actual Results:  
The textarea stops growing when it reaches 75% of the original fieldset width (as expected). Then fieldset begins to grow.

Expected Results:  
The textarea stops growing when it reaches 75% of the original fieldset width and fieldset stays at its original width.

The bug is not present if the text area is not placed in a fieldset.
I can't see the issue on:
Mozilla/5.0 (Windows NT 6.1; rv:2.2a1pre) Gecko/20110406 Firefox/4.2a1pre

Can you attach some screenshots of the issue?
Version: unspecified → 4.0 Branch
Top to bottom:
1. Started dragging the resize grip.
2. Textarea size is constrained while the grip is dragged inside the fieldset..
3. Textarea and fieldset size is increased after the grip is dragged outside the fieldset.
I can still see the issue on:
Mozilla/5.0 (Windows NT 5.1; rv:2.2a1pre) Gecko/20110407 Firefox/4.2a1pre

I did a clean Firefox 4.0 install on a virtual machine, then I installed Minefield on top of it.
Confirmed on Mozilla/5.0 (Windows NT 6.1; rv:2.2a1pre) Gecko/20110407 Firefox/4.2a1pre
Component: General → DOM: CSS Object Model
Product: Firefox → Core
QA Contact: general → style-system
Version: 4.0 Branch → 2.0 Branch
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 504622
I don't see how this bug is duplicate. The problem is not absence of scrollbars. The problem is:
1. textarea makes fieldset grow despite being constrained with max-width.
2. fieldset ignores its own max-width.
3. textarea nested in a <div> or <p> doesn't make its parent grow in the same case.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
The same behavior is present on Chrome:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16

I see how it may have been done in Firefox for compatibility but is still looks like a bug.
> I don't see how this bug is duplicate.

You should look at the styles set on the textarea, then.  When it's resized it's contricution to the fieldset's min-intrinsic width increases.

> 2. fieldset ignores its own max-width.

Yes, that's what bug 504622 is about!
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 504622
You need to log in before you can comment on or make changes to this bug.