diff --git a/toolkit/content/tests/widgets/Makefile.in b/toolkit/content/tests/widgets/Makefile.in
index 4ab09c066127..6d78e04d7037 100644
--- a/toolkit/content/tests/widgets/Makefile.in
+++ b/toolkit/content/tests/widgets/Makefile.in
@@ -112,7 +112,6 @@ _TEST_FILES = test_bug360220.xul \
test_videocontrols.html \
test_videocontrols_video_direction.html \
test_videocontrols_audio_direction.html \
- test_richlist_direction.xul \
videocontrols_direction-1-ref.html \
videocontrols_direction-1a.html \
videocontrols_direction-1b.html \
diff --git a/toolkit/content/tests/widgets/test_richlist_direction.xul b/toolkit/content/tests/widgets/test_richlist_direction.xul
deleted file mode 100644
index 198d8fb43d5c..000000000000
--- a/toolkit/content/tests/widgets/test_richlist_direction.xul
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/toolkit/content/widgets/listbox.xml b/toolkit/content/widgets/listbox.xml
index 53d3aa1c7447..63ef676f93ef 100644
--- a/toolkit/content/widgets/listbox.xml
+++ b/toolkit/content/widgets/listbox.xml
@@ -547,10 +547,8 @@
@@ -577,7 +575,6 @@
false
false
- false
null
null
null
@@ -591,33 +588,17 @@
action="this._moveByOffsetFromUserEvent(1, event);"
group="system"/>
-
-
+ action="this._moveByOffsetFromUserEvent(-this.currentIndex, event);"
+ group="system"/>
-
-
+ action="this._moveByOffsetFromUserEvent(this.getRowCount() - this.currentIndex - 1, event);"
+ group="system"/>
-
-
+ action="this._moveByOffsetFromUserEvent(this.scrollOnePage(-1), event);"
+ group="system"/>
-
-
+ action="this._moveByOffsetFromUserEvent(this.scrollOnePage(1), event);"
+ group="system"/>
+ flex="1" style="overflow: auto;">
@@ -116,53 +116,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -350,13 +303,9 @@
@@ -406,16 +355,10 @@
if (this.selType != "multiple" && this.selectedCount == 0)
this.selectedItem = currentItem;
- if (this.scrollBoxObject.height) {
+ if (this.scrollBoxObject.height)
this.ensureElementIsVisible(currentItem);
- }
- else {
- // XXX hack around a bug in ensureElementIsVisible as it will
- // scroll beyond the last element, bug 493645.
- var previousElement = this.dir == "reverse" ? currentItem.nextSibling :
- currentItem.previousSibling;
- this.ensureElementIsVisible(previousElement);
- }
+ else // XXX hack around a bug in ensureElementIsVisible
+ this.ensureElementIsVisible(currentItem.previousSibling);
}
this._suppressOnSelect = suppressSelect;
// XXX actually it's just a refresh, but at least