From: Jörn Zaefferer Date: Tue, 6 May 2014 13:06:05 +0000 (+0200) Subject: Menu: Use item.outerHeight() in _scrollIntoView X-Git-Tag: 1.11.0-beta.2~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b22280385c05eaf10f4d480c546906b85aa011e1;p=jquery-ui.git Menu: Use item.outerHeight() in _scrollIntoView Fixes #9991 --- diff --git a/tests/visual/menu/menu.html b/tests/visual/menu/menu.html index dd2ea3407..02c8d1ab5 100644 --- a/tests/visual/menu/menu.html +++ b/tests/visual/menu/menu.html @@ -48,7 +48,7 @@ body { font-size:62.5%; } .ui-menu { width: 200px; margin-bottom: 2em; } .menu2-container { width: 220px; } - .menu4 { height: 200px; overflow-y: auto; overflow-x: hidden; } + .menu4 { height: 225px; overflow-y: auto; overflow-x: hidden; } .address-item { border-bottom: 1px solid #999; } .address-header { display: block; margin-bottom: .2em; font-weight: bold; } .address-content { display: block; margin-bottom: .2em; padding-left: 10px; } diff --git a/ui/menu.js b/ui/menu.js index a096a34a2..479ff5a18 100644 --- a/ui/menu.js +++ b/ui/menu.js @@ -408,7 +408,7 @@ return $.widget( "ui.menu", { offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; scroll = this.activeMenu.scrollTop(); elementHeight = this.activeMenu.height(); - itemHeight = item.height(); + itemHeight = item.outerHeight(); if ( offset < 0 ) { this.activeMenu.scrollTop( scroll + offset );