selectNode method calls for scrollIntoViewIfNeeded() if it exists (true for Chrome and Safari) and calls for scrollIntoView(false) otherwise (true for Firefox). But instead of calling scrollIntoView() with defaults you call it with false argument. And such call causes automatic scroll of a tree list (a big one, that overflows screen height) to put selected element to the bottom of the screen on every call of selectNode method. This UX sucks: you selected an element, put it somewhere on a screen, then you hit "up" or "down" keyboard key that calls for selectNode method - and your tree is scrolled to put selected item at the bottom of visible area! This annoys especially when you see that Chrome browser has not one issue.
I suggest to make the following fix (which works for me): to change
scrollIntoView: function(dom) {
if (!dom) {
return;
}
if (dom.scrollIntoViewIfNeeded) {
dom.scrollIntoViewIfNeeded();
} else if (dom.scrollIntoView) {
dom.scrollIntoView(false);
} else {
try{dom.focus().blur();}catch(e){}
}
},
selectNode
method calls forscrollIntoViewIfNeeded()
if it exists (true for Chrome and Safari) and calls forscrollIntoView(false)
otherwise (true for Firefox). But instead of calling scrollIntoView() with defaults you call it withfalse
argument. And such call causes automatic scroll of a tree list (a big one, that overflows screen height) to put selected element to the bottom of the screen on every call ofselectNode
method. This UX sucks: you selected an element, put it somewhere on a screen, then you hit "up" or "down" keyboard key that calls forselectNode
method - and your tree is scrolled to put selected item at the bottom of visible area! This annoys especially when you see that Chrome browser has not one issue.I suggest to make the following fix (which works for me): to change
to (explicit definition of defaults in a call):