Closed Bug 388112 Opened 16 years ago Closed 16 years ago

Oversize context menu no longer scrolls, just extends offscreen


(Core :: XUL, defect)

Not set





(Reporter: philor, Assigned: enndeakin)



(Keywords: regression)


(2 files, 1 obsolete file)

After the landing of bug 279703, too-large context menus are no longer cropped, with scrolling arrows, they now just extend infinitely offscreen.

1. If you don't already have it, add the boolean pref extensions.checkCompatibility set to false, so I don't have to repackage my test extension from years ago.
2. Install which is an extension from bug 283679 that adds a bunch of context menu items when you right click an image (or, the actual user-step, keep installing extension after extension until your context menu's that bloated).
3. Restart, right click an image.

The context menu shows, extending off the bottom of the screen with no way to get to the invisible items.

At least, the 1.8 behavior of cropping the menu to the size from the click spot to the edge of the screen, with scrolling arrows at each end (and for bonus points, without the bug 283679 behavior of then showing them in context menus that don't need them), or possibly the behavior requested amidst all the spam in bug 245163 of first moving the origin toward the top of the screen, and then only overflowing if the whole menu still won't fit.
Flags: blocking1.9?
Blocks: 283679
Attached patch possible fix (obsolete) — Splinter Review
Not sure if this is the right fix, and I unfortunately don't remember what this line of code was added for. I don't see any issues myself, but it would need more eyes to do some testing here.
Assignee: nobody → enndeakin
Flags: blocking1.9? → blocking1.9+
Attached patch include a testSplinter Review
Haven't seen any issues running with this. I suspect I added this line to workaround an issue I ended up fixing a different way.
Attachment #272400 - Attachment is obsolete: true
Attachment #275620 - Flags: superreview?(bzbarsky)
Attachment #275620 - Flags: review?(bzbarsky)
Comment on attachment 275620 [details] [diff] [review]
include a test

OK, let's give it a shot
Attachment #275620 - Flags: superreview?(bzbarsky)
Attachment #275620 - Flags: superreview+
Attachment #275620 - Flags: review?(bzbarsky)
Attachment #275620 - Flags: review+
Closed: 16 years ago
Resolution: --- → FIXED
Had to disable one of the tests here, but will investigate it
Flags: in-testsuite+
Comment on attachment 276037 [details] [diff] [review]
fix the todo line in the test by making sure to add the window offset to the rectangle offsets in every situation

Attachment #276037 - Flags: review?(mano) → review+
Checked in the updated test
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: xptoolkit.menus → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.