Closed Bug 256040 Opened 21 years ago Closed 20 years ago

Warning ``reference to undefined property currentNode.getAttribute'' [xs] in file ``chrome://messenger/content/mail3PaneWindowCommands.js'', line 1029, character 0.

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey1.0alpha

People

(Reporter: timeless, Assigned: sgautherie)

Details

Attachments

(1 file, 1 obsolete file)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040818 #0: function SearchBarToggled() in <chrome://messenger/content/mail3PaneWindowCommands.js> line 1029 #1: function oncommand(event=Event:{0}) in <chrome://messenger/content/messenger.xul> line 1 Warning ``reference to undefined property currentNode.getAttribute'' [xs] in file ``chrome://messenger/content/mail3PaneWindowCommands.js'', line 1029, character 0. Stopped for error handler. #0: function SearchBarToggled() in <chrome://messenger/content/mail3PaneWindowCommands.js> line 1029 1027: 1028: for (var currentNode = top.document.commandDispatcher.focusedElement; currentNode; currentNode = currentNode.parentNode) { 1029: if (currentNode.getAttribute("hidden") == "true") { 1030: SetFocusThreadPane(); 1031: return; 0001: currentNode $[0] = [XULDocument] [class: XULDocument] {1} 0001: currentNode.getAttribute $[1] = [void] void
I guess we're only interested in looking at parent elements...
Product: Browser → Seamonkey
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b) Gecko/20050217] (release) (W98SE) Steps: 1. Start MailNews with SearchBar hidden 2. View > Show/Hide > Search Bar {{ Warning: reference to undefined property currentNode.getAttribute Source File: chrome://messenger/content/mail3PaneWindowCommands.js Line: 1049 Error: currentNode.getAttribute is not a function Source File: chrome://messenger/content/mail3PaneWindowCommands.js Line: 1049 }} Same W+E when (re)hiding the bar.
[Mozilla Thunderbird, version 1.0.1 (20050309)] (nightly) (W98SE) In TB, same function code, same W+E: {{ Warning: reference to undefined property currentNode.getAttribute Source File: chrome://messenger/content/mail3PaneWindowCommands.js Line: 1011 Error: currentNode.getAttribute is not a function Source File: chrome://messenger/content/mail3PaneWindowCommands.js Line: 1011 }}
(In reply to comment #1) > I guess we're only interested in looking at parent elements... I'm not sure what you meant... What happens is that we test a few XULElement, then test 1/the XULDocument, which causes the W+E. Here is a possible fix: {{ if ((currentNode instanceof XULElement) && currentNode.getAttribute("hidden") == "true") { }} helpwanted !
Keywords: helpwanted
(In reply to comment #4) > if ((currentNode instanceof XULElement) && currentNode.getAttribute("hidden") == "true") { Having established that the node is a XUL element you could use .hidden here.
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b) Gecko/20050217] (release) (W98SE) [Mozilla Thunderbird, version 1.0.1 (20050309)] (nightly) (W98SE) Fixes it in both products.
Assignee: Stefan.Borggraefe → gautheri
Status: NEW → ASSIGNED
Attachment #177226 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #177226 - Flags: review?(mscott)
Severity: normal → minor
Keywords: helpwanted
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → mozilla1.8beta2
Comment on attachment 177226 [details] [diff] [review] (Av1) <mail3PaneWindowCommands.js> Note that it's unnecessary to write == true because .hidden is a boolean attribute.
Attachment #177226 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Av1, with comment 7 suggestion(s). Keeping {{ (Av1) <mail3PaneWindowCommands.js> patch 2005-03-12 07:15 PST 1.79 KB neil.parkwaycc.co.uk: superreview+ }} Scott: Could you review/check in this patch ? Thanks.
Attachment #177226 - Attachment is obsolete: true
Attachment #177239 - Flags: superreview+
Attachment #177239 - Flags: review?(mscott)
Attachment #177226 - Flags: review?(mscott)
Comment on attachment 177239 [details] [diff] [review] (Av1a) <mail3PaneWindowCommands.js> [Checked in: Comment 10] thanks for the patch!
Attachment #177239 - Flags: review?(mscott) → review+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Attachment #177239 - Attachment description: (Av1a) <mail3PaneWindowCommands.js> → (Av1a) <mail3PaneWindowCommands.js> [Checked in: Comment 10]
Attachment #177239 - Attachment is obsolete: true
Target Milestone: mozilla1.8beta2 → ---
Target Milestone: --- → Seamonkey1.0alpha
Attachment #177239 - Attachment is obsolete: false
Component: MailNews: Search → MailNews: Message Display
QA Contact: search
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: