myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <werner.p...@gmail.com>
Subject Re: [Solved] inputCalendar position when using renderAsPopup=true
Date Tue, 20 Mar 2007 14:35:18 GMT
Hagen, Nicholas schrieb:
> I think it may be a little more than that.  The problem is that the button
> that the calendar div will be positioned to is normal positioning.  Thus,
> you can apply the positioning rule there and get the correct x,y offset from
> the page.
> 
> With those values, however, you have to translate that into the coordinate
> space of the relative div which the absolute positioned div is a part of.
> So, you would need to then walk the parents of the absolute positioned div
> until you find a relative positioned div.  Then, you would get its x,y
> position relative to the page and subtract those from the x,y position of
> the corresponding button you are aligning to.  That should then put you into
> the proper coordinate space.
> 

I dont think this really is an issue,
because you basically just walk the offsets up until you hit an absolute
position, the upwalking just does a sum of the offsets, with the
absolute div being the last one because that one is relative to the body
in its offsets.

The only issue I can see here is that the offset positioning basically
fails on position absolute within a form in some browsers, but that is a
browser issue.

Anyway what probably is the wisest solution is to replace the components
positioning code with the one from dojo, this seems to me to be the
wisest solution, to my experince the dojo datepicker positioning works
in all cases I  have thrown at it.


Mime
View raw message