Closed Bug 862330 Opened 11 years ago Closed 6 years ago

setConsumeRollupEvent ROLLUP_NO_CONSUME no longer works - regression

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mkaply, Unassigned)

References

Details

(Keywords: regression)

We're using this code:

      popup.addEventListener("popupshowing", function(event)
      {
        event.target.popupBoxObject.setConsumeRollupEvent(
            Components.interfaces.nsIPopupBoxObject.ROLLUP_NO_CONSUME);
      }, false);

to make our popup not consume the click.

It stopped working on Firefox 19.

I've tracked the regression to between:

2012-10-26-03-06-06-mozilla-central (http://hg.mozilla.org/mozilla-central/rev/5ecff3e46ed5)
and
2012-10-27-03-06-11-mozilla-central (http://hg.mozilla.org/mozilla-central/rev/f9acc2e4d4e3)

http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5ecff3e46ed5&tochange=f9acc2e4d4e3
Keywords: regression
I believe this was regressed by

https://bugzilla.mozilla.org/show_bug.cgi?id=701760
Could you try a debug build and see if you reach
nsMenuPopupFrame::ConsumeOutsideClicks() when the menu rolls up?
What is the value of mConsumeRollupEvent in that case?
BTW, which platform are you on?
Blocks: 701760
I've tried on both Mac and Windows.

I'll get a debug build done.
I do go into mConsumeOutsideClicks when the menu rolls up.

mConsumeRollupEvent is set to 0 (ROLLUP_DEFAULT)
OK, clearly that's not the value you want.  Your setConsumeRollupEvent call
above should land here:
http://hg.mozilla.org/mozilla-central/annotate/690b5e0f6562/layout/xul/base/src/nsPopupBoxObject.cpp#l191
What's the value of 'menuPopupFrame' when you get there? 
Is it the same value as 'this' in nsMenuPopupFrame::ConsumeOutsideClicks() ?
Here's what's happening:

nsPopupBoxObject::SetConsumeRollupEvent is called with 2
which calls
nsMenuPopupFrame::SetConsumeRollupEvent with 2

then at some point, 

nsMenuPopupFrame::AttachedDismissalListener is called
which does this:

mConsumeRollupEvent = nsIPopupBoxObject::ROLLUP_DEFAULT;

so when we get to

nsMenuPopupFrame::ConsumeOutsideClicks, mConsumeRollupEvent is default

Not sure what happened before these changes...
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Legacy Extensions.
Resolution: INACTIVE → WONTFIX
Component: XP Toolkit/Widgets: Menus → XUL
You need to log in before you can comment on or make changes to this bug.