mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
fix switchbox for deeply nested position absolute elements (should use position() instead of offset())
git-svn-id: http://piwigo.org/svn/trunk@24612 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
var sbFunc = function(link, box) {
|
||||
jQuery(link).click(function() {
|
||||
var elt = jQuery(box);
|
||||
elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
|
||||
.css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
|
||||
elt.css("left", Math.min( jQuery(this).position().left, jQuery(window).width() - elt.outerWidth(true) - 5))
|
||||
.css("top", jQuery(this).position().top + jQuery(this).outerHeight(true))
|
||||
.toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user