]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Use item.outerHeight() in _scrollIntoView
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Tue, 6 May 2014 13:06:05 +0000 (15:06 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Tue, 6 May 2014 13:06:56 +0000 (15:06 +0200)
Fixes #9991

tests/visual/menu/menu.html
ui/menu.js

index dd2ea3407d7579cead3e943983456b7d5a454b3a..02c8d1ab56fbd6287d496ec61b73de9234d96468 100644 (file)
@@ -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; }
index a096a34a27214fa9b6e9614ad7be8b815292010d..479ff5a18eb70f5b1f8330d9d6cc37aecf2427f1 100644 (file)
@@ -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 );