File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -490,12 +490,12 @@ $.widget("ui.menu", {
490
490
this . deactivate ( ) ;
491
491
if ( this . hasScroll ( ) ) {
492
492
var offset = item . offset ( ) . top - this . element . offset ( ) . top ,
493
- scroll = this . element . attr ( " scrollTop" ) ,
493
+ scroll = this . element . scrollTop ( ) ,
494
494
elementHeight = this . element . height ( ) ;
495
495
if ( offset < 0 ) {
496
- this . element . attr ( " scrollTop" , scroll + offset ) ;
496
+ this . element . scrollTop ( scroll + offset ) ;
497
497
} else if ( offset >= elementHeight ) {
498
- this . element . attr ( " scrollTop" , scroll + offset - elementHeight + item . height ( ) ) ;
498
+ this . element . scrollTop ( scroll + offset - elementHeight + item . height ( ) ) ;
499
499
}
500
500
}
501
501
this . active = item . eq ( 0 )
@@ -601,7 +601,7 @@ $.widget("ui.menu", {
601
601
} ,
602
602
603
603
hasScroll : function ( ) {
604
- return this . element . height ( ) < this . element . attr ( "scrollHeight" ) ;
604
+ return this . element . height ( ) < this . element [ $ . fn . prop ? "prop" : " attr" ] ( "scrollHeight" ) ;
605
605
} ,
606
606
607
607
select : function ( event ) {
You can’t perform that action at this time.
0 commit comments