Skip to content

Commit b222803

Browse files
committed
Menu: Use item.outerHeight() in _scrollIntoView
Fixes #9991
1 parent 719150e commit b222803

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/visual/menu/menu.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
body { font-size:62.5%; }
4949
.ui-menu { width: 200px; margin-bottom: 2em; }
5050
.menu2-container { width: 220px; }
51-
.menu4 { height: 200px; overflow-y: auto; overflow-x: hidden; }
51+
.menu4 { height: 225px; overflow-y: auto; overflow-x: hidden; }
5252
.address-item { border-bottom: 1px solid #999; }
5353
.address-header { display: block; margin-bottom: .2em; font-weight: bold; }
5454
.address-content { display: block; margin-bottom: .2em; padding-left: 10px; }

ui/menu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ return $.widget( "ui.menu", {
408408
offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
409409
scroll = this.activeMenu.scrollTop();
410410
elementHeight = this.activeMenu.height();
411-
itemHeight = item.height();
411+
itemHeight = item.outerHeight();
412412

413413
if ( offset < 0 ) {
414414
this.activeMenu.scrollTop( scroll + offset );

0 commit comments

Comments
 (0)