Closed Bug 487982 Opened 15 years ago Closed 15 years ago

arrowscrollbox.scrollByIndex fails if there are gaps between the elements

Categories

(Toolkit :: UI Widgets, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: dao, Assigned: dao)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
arrowscrollbox.scrollByIndex fails if there are gaps between the elements. I'm seeing this using the mouse wheel in a bookmark menu on Linux, where menuseparators have a margin.
Attachment #372259 - Flags: review?(enndeakin)
Attachment #372259 - Flags: review?(enndeakin) → review+
Comment on attachment 372259 [details] [diff] [review]
patch

>+          if (aX < elements[low].getBoundingClientRect()[start] ||
>+              aX > elements[high].getBoundingClientRect()[end])
>+            return null;

There should be an if (!elements.length) return above this

I think we could really use a scrollbox test.
Bug 475203 adds some tests for the tabstrip (one of our two arrowscrollbox consumers), but I'm also going to write some generic toolkit tests.
http://hg.mozilla.org/mozilla-central/rev/10528984d5fd
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Depends on: 859126
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: