Having <SELECT> data in an html form changes layout of later controls

RESOLVED WORKSFORME

Status

()

Core
Layout
--
minor
RESOLVED WORKSFORME
11 years ago
9 years ago

People

(Reporter: Steve Francisco, Unassigned)

Tracking

({testcase})

1.8 Branch
x86
All
testcase
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Save the following as an html file and load it into both Firefox and Internet Explorer.  Note that the Create/Cancel button display differently.  For some reason on Firefox, the Cancel button appears on a new line when the intent is that they are on the same line.


<h2>Add a new thing</h2>
<FORM style="display:inline" id="addthingform" name="addthingform" action="/someservlet" method="post">
<INPUT type="hidden" name="cmd" value="createThing">
<table>
<!-- omit this section and the Create/Cancel buttons display on one line -->
<!-- (start of problem section -->
<tr><td>Choice:</td><td>
<SELECT name="ocean">
<OPTION value="ocean1">Atlantic</OPTION>
<OPTION value="ocean2">Pacific</OPTION>
</SELECT>
</td></tr>
<!-- (end of problem section) -->
<tr><td>Name of thing:</td>
<td><INPUT id="name" type="text" name="name" value=""></td></tr>
<tr valign=top><td>Comment:</td><td><TEXTAREA id="comment" name="comment" cols="50" rows="3"></TEXTAREA></td></tr>
</table>
<br><INPUT class=submit type="submit" value="Create"></FORM>&nbsp;
<FORM style="display:inline"  action="/CaspianServlets/com.ibm.caspian.Align" method='post'>
<input class=submit type='submit' value='Cancel'>
</FORM>
<script type="text/javascript">document.addthingform.name.focus();</script>

The problem seems to be the <SELECT> section.  If you comment out that row, or even just the SELECT statement itself, then the buttons display as desired.

Reproducible: Always

Steps to Reproduce:
1.Save the above html text to a file (tmp.html) and load into firefox
2.Note the button position is wrong
3.Comment out or delete the SELECT statement and reload
4.Note the button position is better.
Actual Results:  
As described above

Expected Results:  
I expected the Create and Cancel buttons to be displayed on one line as IE does, and as firefox does if the SELECT statement is not used.
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.8 Branch

Comment 1

11 years ago
Created attachment 261517 [details]
Testcase

Comment 3

11 years ago
The only bugs that seems related to layout in that range is bug 309986
and bug 92217, but those should be fixed on the 1.8 branch too...

Updated

11 years ago
Flags: in-testsuite?

Comment 4

9 years ago
(In reply to comment #3)
> The only bugs that seems related to layout in that range is bug 309986
> and bug 92217, but those should be fixed on the 1.8 branch too...

Probably there was a correlation with another fix that was only checked in to trunk at that time. 

(In reply to comment #1)
> Created an attachment (id=261517) [details]

It doesn't look pretty, but after reading the current CSS 2.1 and checking recent implementations, this is the right rendering.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.