Changeset 13034

Show
Ignore:
Timestamp:
03/11/08 12:03:20 (10 months ago)
Author:
doughays
Message:

Fixes #6146. Removed IE's node.scrollIntoView invocation and used the generic code already available. The menu item was being scroll into view with regard for keeping the parent menu in view as well.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/_base/scroll.js

    r11040 r13034  
    99        // not safari either 
    1010        // dont like browser sniffs implementations but sometimes you have to use it 
    11         if(dojo.isIE){ 
    12                 //only call scrollIntoView if there is a scrollbar for this menu, 
    13                 //otherwise, scrollIntoView will scroll the window scrollbar 
    14                 if(dojo.marginBox(node.parentNode).h <= node.parentNode.scrollHeight){ //PORT was getBorderBox 
    15                         node.scrollIntoView(false); 
    16                 } 
    17         }else if(dojo.isMozilla){ 
     11        if(dojo.isMozilla){ 
    1812                node.scrollIntoView(false); 
    1913        }else{ 
     14                // #6146: IE scrollIntoView is broken 
     15                // It's not enough just to scroll the menu node into view if 
     16                // node.scrollIntoView hides part of the parent's scrollbar, 
     17                // so just manage the parent scrollbar ourselves 
    2018                var parent = node.parentNode; 
    2119                var parentBottom = parent.scrollTop + dojo.marginBox(parent).h; //PORT was getBorderBox