Closed Bug 1186579 Opened 10 years ago Closed 10 years ago

TypeError: aEvent.target is undefined when calling openUILink(kSupportUri, {});

Categories

(Calendar :: Lightning: SeaMonkey Integration, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: philip.chee, Assigned: philip.chee)

Details

Attachments

(1 file, 1 obsolete file)

Error: TypeError: aEvent.target is undefined Source file: chrome://communicator/content/utilityOverlay.js Line: 1418 http://mxr.mozilla.org/comm-central/source/calendar/lightning/content/messenger-overlay-sidebar.js?rev=3fe65676c36b#238 236 // call backs for the opt-out bar 237 let cbLearnMore = function(aNotificationBar, aButton) { 238 openUILink(kSupportUri, {}); 239 return true; 240 }; SeaMonkey (and Firefox) expect that the second parameter is a real event or null.
Attached patch Patch v1.0 proposed fix. (obsolete) — Splinter Review
Alternatives: openUILink(kSupportUri, { button: 0, target: { ownerDocument: document } }); openUILink(kSupportUri, openUILink.length < 3 ? {} : null);
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #8637422 - Flags: review?(philipp)
Comment on attachment 8637422 [details] [diff] [review] Patch v1.0 proposed fix. Review of attachment 8637422 [details] [diff] [review]: ----------------------------------------------------------------- What release do you need this for? r=philipp with this nit: ::: calendar/lightning/content/messenger-overlay-sidebar.js @@ +239,5 @@ > + // In Thunderbird the number of formal parameters is 2. > + if (openUILink.length < 3) > + openUILink(kSupportUri, { button: 0 }); > + else > + openUILink(kSupportUri); // SeaMonkey I think it would be better to differ using xul app info, or just initiate a real Event and pass that unconditionally. If you go for the first solution, brackets even for one-line ifs.
Attachment #8637422 - Flags: review?(philipp) → review+
(In reply to Philip Chee from comment #1) This one is fine with me too: > openUILink(kSupportUri, { button: 0, target: { ownerDocument: document } });
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.2
Target Milestone: 4.2 → 4.4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: