Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 244170

Summary: finding the postion of an element on the Eclipse site
Product: Community Reporter: Jeff McAffer <jeffmcaffer>
Component: WebsiteAssignee: phoenix.ui <phoenix.ui-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: nathan
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Jeff McAffer CLA 2008-08-14 10:35:55 EDT
I am a complete JavaScript newbie and this question is perhaps a bit off topic but...  In an effort to drive more community involvement for RT, I updated the home page (http://eclipse.org/rt) to have a set of google calendars at the bottom.  There are many calendars for various related projects.  Rather than showing a confusing array of them, I hacked up some stuff to popup the calendars when you hover over a link.  The popup should happen where the mouse is or the element being hovered over.  Tracking the mouse seemed overly complicated.  Getting the location of the element seemed relatively easy.

Ok so all worked well on a "normal" web page bu on the eclipse.org phoenix pages it seems like the coordinates are not being computed properly.

My question then is "can you recommend a way of positioning the popup such that it is at or near the thing being mouse overed?"

A further question if you will.  onmouseover seems to work but is very sensitive.  It would be better to use something like hovering would be better.  That is, where there is a time delay so that people just moving the mouse around don't have calendars popping up all over.

Your recommendations and suggestions are most appreciated.  Of course, if this is out of the scope of what you want to answer, that is fine too.
Comment 1 Nathan Gervais CLA 2008-08-14 11:22:15 EDT
Our pages shouldnt have any effect on finding the position of an element.  From what i'm seeing it looks like this could be a float issue or something related to the content being placed at the bottom of the page.

I don't work a lot with IFrames since they always give me fits so i can't really speak to those.  

However i do notice that you have 2 <div id="popupcontent"></div> lines in your source.  This could be causing confusion on your page since the id attribute is supposed to be unique.  Is there a reason you have 2 of them? 

Also here's a handy page for determining mouse positions : http://javascript.internet.com/page-details/mouse-coordinates.html
Comment 2 Denis Roy CLA 2008-08-26 11:33:24 EDT
This isn't a bug, it's a question.  Questions should be on newsgroups  :)