Hi, I'm not sure where your code is maintained and whether there is
any method for bug reporting, but I've found a small bug:

When using a button with fixed position (either explicitly defined or
inherited, such as in a fixed top menu, such as I am doing), and
calling a popup with that button, the popup appears in a completely
different place. I hijacked findPosX() and findPosY() to use
jQuery's .offset() function, and it solves the problem.

findPosX_old=findPosX;
findPosY_old=findPosY;

findPosX=function(el){
        try{return jQuery(el).offset().left;}
        catch(err){return findPosX_old(el);}

}

findPosY=function(el){
        try{return jQuery(el).offset().top;}
        catch(err){return findPosY_old(el);}
}


When an element has position:fixed, it's offsetParent is the window
and returns 'null' stopping the original findPosY() fn. Thus, you
don't get the true offset of a fixed position element. This may not be
the case in IE and Mozilla browsers, but I don't have access to them
right now to test. In safari and chrome on my Mac, the behavior is as
described above.

jQuery .offset() accounts for this behavior and returns the correct
offset() regardless of the 'position' styling.

This code could be put into a plugin, or this behavior could be fixed
in the next TW release.

any feedback is welcome.


see http://axs.tiddlyspot.com/#%5B%5Btesting%20fixed%20position%20buttons%5D%5D
for examples.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to