aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2013-09-24 20:41:18 +0000
committerrvelices <rv-github@modusoptimus.com>2013-09-24 20:41:18 +0000
commitd45adcf0b968e74cb27b8038f227998cbf4137ee (patch)
treebb6467a1e9c8da40ca8c86e23735053cad89a670 /themes/default/js
parentc181c32adfe4c54d4b0b6405d8e8d309b79cabfa (diff)
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
Diffstat (limited to 'themes/default/js')
-rw-r--r--themes/default/js/switchbox.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/default/js/switchbox.js b/themes/default/js/switchbox.js
index 4741e7980..b20f82d50 100644
--- a/themes/default/js/switchbox.js
+++ b/themes/default/js/switchbox.js
@@ -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;
});