Closed Bug 27806 Opened 25 years ago Closed 24 years ago

SELECT element breaks up with style position:absolute; on INPUT

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: keith.lesch, Assigned: attinasi)

References

Details

Attachments

(2 files)

I'll be making an attachment to show the bug although I really don't have a clue 
how to explain it.  The SELECT element seems to be abnormally affected by the 
position:absolute style setting on the INPUT element.  If you remove the style 
setting on the INPUT element, the page displays correctly.
Reassigning to Rod.
Assignee: karnaze → rods
setting to M15
Status: NEW → ASSIGNED
Target Milestone: M15
Looks like the Anonymous content's style is inheriting the absolute position.
Assignee: rods → attinasi
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
The example shows a problem with the anonymous content. It is true that the rule 
INPUT { position:absolute; } is causing the button to 'break away' from the 
SELECT, however from the Style System's perspective, that the behavior is 
correct. Basically we have to apply style to anonymous content as well as normal 
content. For example, if the author had a rule like:

  INPUT { background-color:red; } 

then we would want to honor that, wouldn't we?

I have found that a simple rule in the html.css file fixes this problem with 
absolute positioning:

  SELECT > INPUT[type="button"]{
    position:static !important;
  }

This says that any INPUT element that has type of button that has a parent of 
SELECT will be staticly positioned. This seems to fix it. 

Rod, Please check if it makes life better for you and let me know. There may be 
other attributes we want to put in that rule, like visibility:visible maybe???
*** Bug 34036 has been marked as a duplicate of this bug. ***
I don't know about the vis rule, but I tested this the other rule via my own dup 
bug 34036. So yes, go ahead and check it in.
Added new rule to HTML.CSS to keep buttons that are children of selects from 
being absolutely positioned.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verifying.  I am supposed to do this on the bugs I own, correct?

Looks fine in M15.  Thanks!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: