aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2014-05-06 15:06:05 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2014-05-06 15:06:56 +0200
commitb22280385c05eaf10f4d480c546906b85aa011e1 (patch)
tree8ec4ff87d1654b44b5fd40139a150fb0a611ad48
parent719150e92cab3c962eb5b11e6c03bd4ae8a54d96 (diff)
downloadjquery-ui-b22280385c05eaf10f4d480c546906b85aa011e1.tar.gz
jquery-ui-b22280385c05eaf10f4d480c546906b85aa011e1.zip
Menu: Use item.outerHeight() in _scrollIntoView
Fixes #9991
-rw-r--r--tests/visual/menu/menu.html2
-rw-r--r--ui/menu.js2
2 files changed, 2 insertions, 2 deletions
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 );