Closed Bug 205440 Opened 21 years ago Closed 21 years ago

JavaScript error in internetresults.xul/.js

Categories

(SeaMonkey :: Search, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mnyromyr, Assigned: mnyromyr)

Details

Attachments

(1 file, 2 obsolete files)

[This is another spin-off of my patch of bug 57654.]

1. "Error: switchTab is not defined"
- enable advanced search in preferences->navigator->internet search
- open the sidebar search panel
- search something within *multiple* search engines
==> the combined results will be shown in the browser window
- select a single search engine from the drop down box in the browser window
==> the JavaScript console will show "Error: switchTab is not defined"

2. function not always returning a value
In internetresults.js, the event handler functions "listSelect" and "listClick"
do not always return a value.


Patch is forthcoming.
Attached patch very small and simple patch (obsolete) — Splinter Review
This patch fixes the missing inclusion of search-panel.js in
internetresults.xul, the associated getElementById problem in search-panel.js,
and sets return values in internetresults.js.
Attachment #123430 - Flags: superreview?(jaggernaut)
Attachment #123430 - Flags: review?(shliang)
Attachment #123430 - Flags: review?(shliang) → review+
- return savely from SwitchPanel if there's no sidebar search panel
- removed padding space
Attachment #123430 - Attachment is obsolete: true
Attachment #124867 - Flags: superreview?(jaggernaut)
Attachment #123430 - Flags: superreview?(jaggernaut)
Comment on attachment 124867 [details] [diff] [review]
incorporating jag's comments from IRC

Sorry for not looking at this earlier.

Is that try/catch really needed there?

Would it be better to move switchTab into shared.js so you can avoid having to
include search-panel.js in internetresults.xul?

If your answer is no, sr=jag
Attachment #124867 - Flags: superreview?(jaggernaut) → superreview+
- rewrite of the switchTab function without try{}catch by using available
functions; cruft deleted
- moving switchTab to shared.js meant to move getNavigatorWindow also
Attachment #126263 - Flags: superreview?(jaggernaut)
Comment on attachment 126263 [details] [diff] [review]
suggested changes from comment #3

sr=jag.
Attachment #126263 - Flags: superreview?(jaggernaut) → superreview+
Attachment #126263 - Flags: review?(shliang)
Attachment #124867 - Attachment is obsolete: true
Comment on attachment 126263 [details] [diff] [review]
suggested changes from comment #3

taking over (unconditional) r+ from first patch
Attachment #126263 - Flags: review?(shliang)
checked in, marking fixed
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: