Closed
Bug 1081765
Opened 11 years ago
Closed 11 years ago
JavaScript strict warning: chrome://messenger/content/nsContextMenu.js, line 103: ReferenceError: reference to undefined property this.onEditableArea
Categories
(Thunderbird :: Message Reader UI, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 912116
People
(Reporter: ishikawa, Unassigned)
References
Details
During |make mozmill| testing of locally built DEBUG BUILD of C-C TB,
I see
JavaScript strict warning: chrome://messenger/content/nsContextMenu.js, line 103: ReferenceError: reference to undefined property this.onEditableArea
four times in the execution.
nsContextMenu.js ought to be
This one for TB: comm-central/mail/base/content/mailContextMenus.js
comm-central/suite/mailnews/mailContextMenus.js
But strangely line 103 is an empty line(?)
100 function GetMessageIdFromNode(messageIdNode, cleanMessageId)
101 {
102 var messageId = messageIdNode.getAttribute("messageid");
103
104 // remove < and >
105 if (cleanMessageId)
106 messageId = messageId.substring(1, messageId.length - 1);
I have no idea what is going on, but report this to make the
code into a better shape.
TIA
| Reporter | ||
Comment 1•11 years ago
|
||
> nsContextMenu.js ought to be
>
> This one for TB: comm-central/mail/base/content/mailContextMenus.js
> comm-central/suite/mailnews/mailContextMenus.js
>
> But strangely line 103 is an empty line(?)
>
> 100 function GetMessageIdFromNode(messageIdNode, cleanMessageId)
> 101 {
> 102 var messageId = messageIdNode.getAttribute("messageid");
> 103
> 104 // remove < and >
> 105 if (cleanMessageId)
> 106 messageId = messageId.substring(1, messageId.length - 1);
>
> I have no idea what is going on, but report this to make the
> code into a better shape.
>
> TIA
I was looking at a wrong file.
mailContextMenu.js vs nsContextMenu.js.
This is where the error comes:
684 /**
685 * Set a DOM node's hidden property by passing in the node's id or the
686 * element itself.
687 * @param aItemOrId
688 * a DOM node or the id of a DOM node
689 * @param aShow
690 * true to show, false to hide
691 */
692 showItem : function CM_showItem(aItemOrId, aShow) {
693 var item = aItemOrId.constructor == String ? document.getElementById(aItemOrId) : aItemOrId;
694 item.hidden = !aShow;
695 },
So item becomes null on line 692.
TIA
| Reporter | ||
Comment 2•11 years ago
|
||
(In reply to ISHIKAWA, Chiaki from comment #1)
>
Oops.
Wrong post.
That was meant for Bug 1081767.
I was looking at a wrong file.
nsMenuContext.js vs mailMenuContext.js
Correct file nsMenuContext.js:
99 initSpellingItems: function CM_initSpellingItems() {
100 let canSpell = gSpellChecker.canSpellCheck;
101 let onMisspelling = gSpellChecker.overMisspelling;
102 this.showItem("mailContext-spell-check-enabled", canSpell);
* 103 this.showItem("mailContext-spell-separator", canSpell || this.onEditableArea);
104 if (canSpell) {
105 document.getElementById("mailContext-spell-check-enabled")
106 .setAttribute("checked", gSpellChecker.enabled);
107 }
108
Line 103 above is where the reference to this.onEditableArea is made.
TIA
Comment 3•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•