diff --git a/mozilla/toolkit/content/widgets/richlistbox.xml b/mozilla/toolkit/content/widgets/richlistbox.xml index 05dc9d30134..5eb75885988 100644 --- a/mozilla/toolkit/content/widgets/richlistbox.xml +++ b/mozilla/toolkit/content/widgets/richlistbox.xml @@ -314,6 +314,70 @@ + + + + = y.value) && + (aItem.boxObject.y < y.value + this.scrollBoxObject.height); + ]]> + + + + + + + = 0 && index >= 0 && index < this.getRowCount()) { + var actualIndex = (index && aDirection == -1) ? index - 1 : index; + height -= this.getItemAtIndex(actualIndex).boxObject.height; + index += aDirection; + } + index -= aDirection; + + if (this.selectedItem != index) { + this.selectedItem = this.getItemAtIndex(index); + return true; + } + + // Move by at least one item if the view port is too small + if (aDirection == -1) + return this.goUp(); + + return this.goDown(); + ]]> + + + @@ -394,6 +458,8 @@ + +