Cell contents go beyond cell border




Layout: Block and Inline
17 years ago
12 years ago


(Reporter: salwan.searty, Unassigned)




Firefox Tracking Flags

(Not tracked)



(1 attachment)



17 years ago
When we have a form element (such as a radio button, checkbox, or text field) 
followed by a space ( ) then followed by text, all in table cell of a 
limited width, the text can cross the boundaries of the cell it is in. In other
words, Mozilla is not stretching out the width of the cell to the length of its 
contents. This problem only occurs when there's a form element following by a 
space ( ), and thus I think the problem is that Mozilla is not taking into 
consideration the width of the form element when calculating how wide it should 
draw the cell.

<TABLE BORDER="1" width=20>
            <INPUT TYPE="Radio">&nbsp;Cell

Comment 1

17 years ago
Created attachment 32334 [details]
Sample html page


17 years ago
Keywords: testcase

Comment 2

17 years ago
Block 0118C708 reports a me=420 but then can't honor that as an avail width 
later. Reassigning to attinasi.

Tbl 01191E54 r=0 a=8940,UC c=0,0 cnt=124
 Tbl 0118C1D0 r=0 a=8940,UC c=270,UC cnt=125
  RowG 0118C368 r=0 a=UC,UC c=UC,UC cnt=126
   Row 0118C4E8 r=0 a=UC,UC c=UC,UC cnt=127
    Cell 0118C6AC r=0 a=UC,UC c=UC,UC cnt=128
     Block 0118C708 r=0 a=UC,UC c=UC,UC cnt=129
     Block 0118C708 d=720,285 me=420
    Cell 0118C6AC d=780,345 me=480
   Row 0118C4E8 d=UC,345
  RowG 0118C368 d=UC,345
Initialized min=570 des=570 pref=570
Balanced min=570 des=570 pref=570 cols=480
  RowG 0118C368 r=2 a=540,UC c=540,UC cnt=130
   Row 0118C4E8 r=2 a=540,UC c=540,UC cnt=131
    Cell 0118C6AC r=2 a=480,UC c=420,UC cnt=132
     Block 0118C708 r=2 a=420,UC c=420,UC cnt=133
     Block 0118C708 d=660,285
    Cell 0118C6AC d=720,345
   Row 0118C4E8 d=540,345
  RowG 0118C368 d=540,345
 Tbl 0118C1D0 d=570,435
Tbl 01191E54 d=570,435
Assignee: karnaze → attinasi
Component: HTMLTables → Layout
Still a problem with 11/02/2001 CVS build on WINNT.
Target Milestone: --- → mozilla1.2


16 years ago
Priority: -- → P3
Assignee: attinasi → block-and-inline
Component: Layout → Layout: Block & Inline
Priority: P3 → --
QA Contact: amar → ian
Target Milestone: mozilla1.2alpha → ---

Comment 5

15 years ago
Problem exists in both 1.3 and 1.4b for Linux.
Depends on: 231644

Comment 6

14 years ago
Using Mozilla 1.7rc2
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514
In the testcase, all the contents remain inside the border.

Comment 7

13 years ago
*** Bug 139152 has been marked as a duplicate of this bug. ***

Comment 8

13 years ago
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050409
IE6 widens the cell enough to fit the radio button and the text on one line. 
Mozilla Trunk Nightly 2005040905 displays the text below the radio button,
expanding the cell enough to contain both the button and text.

The cell is expanding to enclose all of its contents.  I'm unsure whether
expanding only horizontally (as IE6 does) or expanding both horizontally and
vertically (as Mozilla is doing) is the correct behavior.  (That's probably a
different bug.)

Comment 9

12 years ago
Same problem can occur when setting the innerHTML of an already-layed-out cell such that the new content (all text, no images) requires more space than the original layout.  The new text simply overflows instead of resizing the cell/row to appropriately hold contents.

Comment 10

12 years ago
Correction: my previous comment is only true if you:

(Take for example a table row w/ two cells, A and B)

1) Display the row w/ initial data that only takes up one line of text per cell
(Steps 2 and 3 happen within the same JS function...don't let page redraw in between 2 and 3)
2) Replace the innerHTML of cell A with text that goes beyond the previous cell size of one line of text
3) Replace the innerHTML of cell B with text that stays within the previous cell size of one line of text
4) Let page redraw

Observed: cell A's text overflows the boundary of the row...apparently the redraw only took the last innerHTML replacement into account when calculating the size of the cell/row.

Comment 11

12 years ago
Testcase WFM on Firefox, matching what Ronald reported for 1.8b2.

Re comment #10:
I can't reproduce that behavior. If it still happens, I think you should file a new bug and attach a testcase.
Last Resolved: 12 years ago
Resolution: --- → WORKSFORME
Remaining issue is duplicate of bug 32774.
You need to log in before you can comment on or make changes to this bug.