You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Dennis Byrne <de...@dbyrne.net> on 2006/01/18 00:55:08 UTC

z-order of drop down lists and t:inputCalendar

For those of you using t:calendar, you may notice that it hides all drop down lists on the page whenever the calendar pops up.  I was wondering if anyone can shed some light on why this happens.  The last time I had this conversation with a colleague, I remeber him telling me that with some operating systems, the drop down list control get it's "own window" and you simply cannot display another control on top by manipulating the z order.  Apparently this goes back to the early 90's .  Can't find anything on Google either.

Dennis Byrne



Re: z-order of drop down lists and t:inputCalendar

Posted by Martin Marinschek <ma...@gmail.com>.
That has already been implemented in the calendar in the current SVN
head version.

regards,

Martin

On 1/18/06, Werner Punz <we...@gmx.at> wrote:
> Werner Punz schrieb:
> > Simon Kitching schrieb:
> >> On Tue, 2006-01-17 at 23:55 +0000, Dennis Byrne wrote:
> >>> For those of you using t:calendar, you may notice that it hides all
> >>> drop down lists on the page whenever
> >>> the calendar pops up.  I was wondering if anyone can shed some light
> >>> on why this happens.
> >>
> >>
> >> I believe it's a workaround for a nasty bug in IE, where IE's <select>
> >> components always appear on top of everything else. The only way to get
> >> "popups" to work properly, therefore, is to hide all the <select>
> >> objects.
> >>
> > Actually that assumption is wrong, that is a nasty workaround which
> > compromises the entire page. The best fix so far is to place a div
> > under the popup and on top of the select box.
> >
> >
> Sorry I did not mean div, it is an iframe, you have to place an iframe
> in between the two controls, that fixes the problem.
> But you should only do that in IE certain non IE browser versions
> can go haywire over this.
>
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: z-order of drop down lists and t:inputCalendar

Posted by Werner Punz <we...@gmx.at>.
Werner Punz schrieb:
> Simon Kitching schrieb:
>> On Tue, 2006-01-17 at 23:55 +0000, Dennis Byrne wrote:
>>> For those of you using t:calendar, you may notice that it hides all 
>>> drop down lists on the page whenever
>>> the calendar pops up.  I was wondering if anyone can shed some light 
>>> on why this happens.
>>
>>
>> I believe it's a workaround for a nasty bug in IE, where IE's <select>
>> components always appear on top of everything else. The only way to get
>> "popups" to work properly, therefore, is to hide all the <select>
>> objects.
>>
> Actually that assumption is wrong, that is a nasty workaround which
> compromises the entire page. The best fix so far is to place a div
> under the popup and on top of the select box.
> 
> 
Sorry I did not mean div, it is an iframe, you have to place an iframe 
in between the two controls, that fixes the problem.
But you should only do that in IE certain non IE browser versions
can go haywire over this.


Re: z-order of drop down lists and t:inputCalendar

Posted by Werner Punz <we...@gmx.at>.
Simon Kitching schrieb:
> On Tue, 2006-01-17 at 23:55 +0000, Dennis Byrne wrote:
>> For those of you using t:calendar, you may notice that it hides all drop down lists on the page whenever
>> the calendar pops up.  I was wondering if anyone can shed some light on why this happens.
> 
> 
> I believe it's a workaround for a nasty bug in IE, where IE's <select>
> components always appear on top of everything else. The only way to get
> "popups" to work properly, therefore, is to hide all the <select>
> objects.
>
Actually that assumption is wrong, that is a nasty workaround which
compromises the entire page. The best fix so far is to place a div
under the popup and on top of the select box.


> I saw a full description of the problem somewhere but don't have the
> reference. I expect (hope) the popup or calendar source code would have
> a comment explaining this.
> 
IE div over select box bug ;-)
The popup control in tomahawk has a fix for it since 1.1.1 which works 
without hiding the select boxes.


Re: z-order of drop down lists and t:inputCalendar

Posted by Simon Kitching <sk...@apache.org>.
On Tue, 2006-01-17 at 23:55 +0000, Dennis Byrne wrote:
> For those of you using t:calendar, you may notice that it hides all drop down lists on the page whenever
> the calendar pops up.  I was wondering if anyone can shed some light on why this happens.


I believe it's a workaround for a nasty bug in IE, where IE's <select>
components always appear on top of everything else. The only way to get
"popups" to work properly, therefore, is to hide all the <select>
objects.

I saw a full description of the problem somewhere but don't have the
reference. I expect (hope) the popup or calendar source code would have
a comment explaining this.

Regards,

Simon


Re: z-order of drop down lists and t:inputCalendar

Posted by Werner Punz <we...@gmx.at>.
Dennis Byrne schrieb:
> For those of you using t:calendar, you may notice that it hides all 

>drop down lists on the page whenever the calendar pops up.  I was wondering 

>if anyone can shed some light on why this happens.  The last time I had this 

>conversation with a colleague, I remeber him telling me that with some 

>operating systems, the drop down list control get it's "own window" and you 

>simply cannot display another control on top by manipulating the z order.  

>Apparently this goes back to the early 90's .  Can't find anything on Google either.
> 

google for the div over drop down bug in the Internet Explorer, you 
basically can only bypass that one by putting an iframe under the div 
tag which renders the popup.

All Internet Explorer on Windows versions are affected (except IE7 beta)
the bug has been known for 7-8 years and never has been fixed by Microsoft.
(one indication of the shoddy state the IE is actually in)

The reason for this bug is, that the IE rendering engine uses a mixup of 
both self rendered and Windows controls, both run in their own 
respective rendering engines and probably also event queues.
It internally then meshes both systems. The problem now is, once
a IE rendered control tries to be on top of a windows control by 
manipulation of the z-order, the whole thing fails, due to the different 
rendering queues. Putting an iframe on top of that for some strange kind 
of reason fixes that, the iframe basically can hide the windows control, 
and you can fix the z order that way and put anything rendered by the ie 
on top of the iframe.

You can find the fix code for this in many controls of myfaces (I once 
did a fixup for that bug in the popup javascript code for the popup 
control (shameless plug inserted here), the code there is very generic 
and can be recycled with minor modifications into any control )

The main problem with this iframe method is, you should only use it on 
the IE, because other browsers namely several Mozilla versions do not 
like hidden iframes and basically the page goes haywire over this once 
you start scrolling vertically.