mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Accordion: Handle box-sizing: border-box
in animations
Fixes #9264
Closes gh-1287
Closes gh-1459
(cherry picked from commit 4b017b414f
)
This commit is contained in:
parent
04ab6e0388
commit
de75b40835
@ -516,6 +516,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 || {},
|
||||
@ -558,7 +559,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;
|
||||
|
Loading…
Reference in New Issue
Block a user