Closed Bug 767462 Opened 12 years ago Closed 12 years ago

Allow controlling outside-click event consumption with an attribute

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: dao, Assigned: dao)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
On Windows (I don't know about other platforms) panels have a bug or misfeature that intermittently renders the previous contents when opening a panel a second time. This currently affects the identity popup (there's a bug filed, but I couldn't find it). A workaround for this is to set hidden=true when the panel hides. However, this throws the popup box object away, making previous popupBoxObject.setConsumeRollupEvent calls ineffective.
Attachment #635805 - Flags: review?(enndeakin)
(In reply to Dão Gottwald [:dao] from comment #0)
> This currently affects the identity popup (there's a bug filed, but I couldn't find it).

bug 684534
Comment on attachment 635805 [details] [diff] [review]
patch

I'd call the attribute 'consumeclicks' (or 'consumeoutsideclicks') since there isn't really a 'rollup' event fired in either case.
Attachment #635805 - Flags: review?(enndeakin) → review+
consumeoutsideclicks sounds good to me, I can use that.
Keywords: dev-doc-needed
Summary: Allow controlling rollup event consumption with an attribute → Allow controlling outside-click event consumption with an attribute
Attached patch patch v2Splinter Review
Attachment #635805 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/16477f23e113
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: 767813
No longer blocks: 767133
Blocks: 767975
I've added documentation for this. Can someone please verify?

https://developer.mozilla.org/en-US/docs/XUL/panel#a-consumeoutsideclicks

https://developer.mozilla.org/en-US/docs/XUL/Attribute/consumeoutsideclicks

Should I add to menupopup as well? Or is it really only relevant for panels?
You probably wouldn't want to set this on a menupopup. At least I can't think of a case where it would make sense.
I've made it panel only.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: