From b22280385c05eaf10f4d480c546906b85aa011e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 6 May 2014 15:06:05 +0200 Subject: [PATCH] Menu: Use item.outerHeight() in _scrollIntoView Fixes #9991 --- tests/visual/menu/menu.html | 2 +- ui/menu.js | 2 +- 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 ); -- 2.39.5