Closed Bug 241792 Opened 16 years ago Closed 16 years ago
Select Elements Unselectable When Floating Over a Relative Positioned Block
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040421 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040421 If I float a form over a relatively positioned block, then I can no longer select the select box in the form. Reproducible: Always Steps to Reproduce: 1. Click on Select Box Actual Results: The word "Relative" is selected on the second click Expected Results: the select box should have received focus and the options should have been revealed.
(see url for a testcase)
Workaround is to relative the form and z-index it... but, should I have to do that?
I think this is a dupe of bug 102695
> If I float a form over a relatively positioned block You mean under, right? Positioned boxes with auto or zero z-index stack above floating non-positioned boxes. See http://www.w3.org/TR/CSS21/zindex.html#q2 Marking duplicate, since fixing that bug would "fix" this. In my opinion, though, our behavior there is correct. *** This bug has been marked as a duplicate of 102695 ***
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Thanks Boris. Looks like the relative positioned div fails into layout number 7; whereas, before being positioned, fell into layout number 4. Meanwhile, the floated form falls into layout number 5. Basically, what I didn't realize was that relatively positioned divs pop-out over any floated elements non-positioned... but I'm still confused, the background of the relative div now appears above the select widget, so that putting a background color on the relative div paints over the select box; yet, the text still respects the float... I guess that there is a world of difference between text layout and mouse events. Still, nonwithstanding the complex decisions/standards involved in layout, its counter-intuitive that the text is so very careful about a float - enough to make room for it even when the div is relative and above the float; yet, the div is 'rude', not allowing mouse-clicks through the area the text made room for... Ps. IE 'avoids' this particular issue by actually shorting the relative div's width to buffet up against the float. +------------------++------+ | relative div ||float | +------------------++------+ But I'm sure you are aware of this quirk.
> yet, the text still respects the float... That's because relatively positioning the div shouldn't affect its layout -- it should flow the same way it did when it was not positioned. Yay specs. ;) > Ps. IE 'avoids' this particular issue IE's engine predates the existence relevant section of CSS by several years and it's not exactly being updated, so....
You need to log in before you can comment on or make changes to this bug.