Closed Bug 345928 Opened 15 years ago Closed 14 years ago

In <menulist.xml>, Strict "Warning: function _selectInputFieldValueInList does not always return a value"

Categories

(Core :: XUL, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.8.1beta2

People

(Reporter: sgautherie, Assigned: zeniko)

References

Details

(Keywords: fixed-seamonkey1.1a, fixed1.8.1, Whiteboard: [verified-seamonkey1.1a])

Attachments

(1 file)

[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1b1) Gecko/20060725 SeaMonkey/1.1a] (nightly) (W98SE)

1. Compose a HTML message
2. Insert > Table...
3. Advanced Edit...
[
Warning: function _selectInputFieldValueInList does not always return a value
Source File: chrome://global/content/bindings/menulist.xml
Line: 303, Column: 7
Source Code:
        
]
(only the first time in a session !?)

Code is
[
287       <method name="_selectInputFieldValueInList">
288         <body>
289         <![CDATA[
290           if (this.hasAttribute("disableautoselect"))
291             return "";
292 
293           // Find and select the menuitem that matches inputField's "value"
294           var arr = null;
295           var popup = this.menupopup;
296 
297           if (popup)
298             arr = popup.getElementsByAttribute('label', this.inputField.value);
299 
300           this.setSelectionInternal(arr ? arr.item(0) : null);
301         ]]>
302         </body>
303       </method>
]

Same code in /toolkit/.
Attached patch trivial fixSplinter Review
The result of this function is never used anyway (http://lxr.mozilla.org/mozilla/search?string=_selectInputFieldValueInList), so not returning anything is provably harmless (thus the a?).
Assignee: jag → zeniko
Status: NEW → ASSIGNED
Attachment #231148 - Flags: superreview?(neil)
Attachment #231148 - Flags: review?(mconnor)
Attachment #231148 - Flags: approval1.8.1?
Blocks: 296661
Target Milestone: --- → mozilla1.8.1beta2
Attachment #231148 - Flags: superreview?(neil)
Attachment #231148 - Flags: superreview+
Attachment #231148 - Flags: review?(mconnor)
Attachment #231148 - Flags: review+
Whiteboard: [checkin needed]
Checking in xpfe/global/resources/content/bindings/menulist.xml;
/cvsroot/mozilla/xpfe/global/resources/content/bindings/menulist.xml,v  <--  men
ulist.xml
new revision: 1.39; previous revision: 1.38
done
Checking in toolkit/content/widgets/menulist.xml;
/cvsroot/mozilla/toolkit/content/widgets/menulist.xml,v  <--  menulist.xml
new revision: 1.22; previous revision: 1.21
done

Checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Attachment #231148 - Flags: approval1.8.1? → approval1.8.1+
Checking in xpfe/global/resources/content/bindings/menulist.xml;
/cvsroot/mozilla/xpfe/global/resources/content/bindings/menulist.xml,v  <--  men
ulist.xml
new revision: 1.35.8.2; previous revision: 1.35.8.1
done
Checking in toolkit/content/widgets/menulist.xml;
/cvsroot/mozilla/toolkit/content/widgets/menulist.xml,v  <--  menulist.xml
new revision: 1.19.8.3; previous revision: 1.19.8.2
done

Checked into 1.8.1 branch.
Keywords: fixed1.8.1
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1b1) Gecko/20060802 SeaMonkey/1.1a] (nightly) (W98SE)

V.Fixed on MOZILLA_1_8_BRANCH.
Whiteboard: [verified-seamonkey1.1a]
You need to log in before you can comment on or make changes to this bug.