File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 149
149
var scrollTop = $ ( window ) . scrollTop ( ) ,
150
150
htmlHeight = $ ( 'html' ) . outerHeight ( true ) ;
151
151
152
- // temporarily must force hidden parents visible
152
+ // get hidden parents
153
153
var $hiddenParents = $elements . parents ( ) . filter ( ':hidden' ) ;
154
+
155
+ // cache the original inline style
156
+ $hiddenParents . each ( function ( ) {
157
+ var $that = $ ( this ) ;
158
+ $that . data ( 'style-cache' , $that . attr ( 'style' ) ) ;
159
+ } ) ;
160
+
161
+ // temporarily must force hidden parents visible
154
162
$hiddenParents . css ( 'display' , 'block' ) ;
155
163
156
164
// get rows if using byRow, otherwise assume one row
229
237
} ) ;
230
238
231
239
// revert hidden parents
232
- $hiddenParents . css ( 'display' , '' ) ;
240
+ $hiddenParents . each ( function ( ) {
241
+ var $that = $ ( this ) ;
242
+ $that . attr ( 'style' , $that . data ( 'style-cache' ) || null ) ;
243
+ } ) ;
233
244
234
245
// restore scroll position if enabled
235
246
if ( matchHeight . _maintainScroll )
You can’t perform that action at this time.
0 commit comments