aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-03-02 18:43:07 -0500
committerScott González <scott.gonzalez@gmail.com>2015-03-03 08:28:52 -0500
commit4b017b414f107ed3c1dafc7601b61cbcd76acf61 (patch)
tree679f7c03603162a63f855002f2c23322f686210f
parentc077e0a347826c7acca4ca2f775ca59e3b5f8d07 (diff)
downloadjquery-ui-4b017b414f107ed3c1dafc7601b61cbcd76acf61.tar.gz
jquery-ui-4b017b414f107ed3c1dafc7601b61cbcd76acf61.zip
Accordion: Handle `box-sizing: border-box` in animations
Fixes #9264 Closes gh-1287 Closes gh-1459
-rw-r--r--ui/accordion.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/accordion.js b/ui/accordion.js
index cf53e9839..68a4c34ec 100644
--- a/ui/accordion.js
+++ b/ui/accordion.js
@@ -524,6 +524,7 @@ return $.widget( "ui.accordion", {
var total, easing, duration,
that = this,
adjust = 0,
+ boxSizing = toShow.css( "box-sizing" ),
down = toShow.length &&
( !toHide.length || ( toShow.index() < toHide.index() ) ),
animate = this.options.animate || {},
@@ -566,7 +567,9 @@ return $.widget( "ui.accordion", {
step: function( now, fx ) {
fx.now = Math.round( now );
if ( fx.prop !== "height" ) {
- adjust += fx.now;
+ if ( boxSizing === "content-box" ) {
+ adjust += fx.now;
+ }
} else if ( that.options.heightStyle !== "content" ) {
fx.now = Math.round( total - toHide.outerHeight() - adjust );
adjust = 0;