Closed Bug 532505 Opened 15 years ago Closed 13 years ago

Cannot select address book if quick search widget is removed from toolbar - Error: gSearchInput is null ... abCommon.js Line: 588

Categories

(Thunderbird :: Address Book, defect)

x86
All
defect
Not set
major

Tracking

(blocking-thunderbird5.0 -, thunderbird3.0 wanted)

RESOLVED FIXED
Thunderbird 8.0
Tracking Status
blocking-thunderbird5.0 --- -
thunderbird3.0 --- wanted

People

(Reporter: stevehanler, Assigned: squib)

References

()

Details

(Keywords: regression, Whiteboard: [gs][datalossy])

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091130 Lightning/1.0b1pre Thunderbird/3.0

When you remove the Quick Search box from the address book toolbar, you can no longer select/display any address books but the default.  Also, the error console displays "Error: gSearchInput is null Source File: chrome://messenger/content/addressbook/abCommon.js Line: 588" when you try to select the address book.

Reproducible: Always

Steps to Reproduce:
1. Open Address Book
2. Right click toolbar -> Customize
3. Remove Quick Search box
4. Close and reopen address book
5. Select "Collected Address"
Actual Results:  
Selected address book is not displayed, error is logged in error console.

Expected Results:  
Address book should be displayed and there shouldn't be an error.
Summary: Cannot select address book if is search box removed from toolbar → Cannot select address book if the search box is removed from toolbar
Confirmed here with STR (step to reproduce) in comment #0

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091202 Lightning/1.0b1pre Shredder/3.0.1pre ID:20091202032005

Probably related to all OS.
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-thunderbird3?
Version: unspecified → Trunk
Not blocking on this as generally there isn't a reason to remove the quick search widget from the toolbar in the address book and the default mode works fine.

We would consider a patch for 3.0.x if it was low risk enough.
Flags: blocking-thunderbird3? → blocking-thunderbird3-
Keywords: regression
OS: Windows XP → All
Summary: Cannot select address book if the search box is removed from toolbar → Cannot select address book if quick search widget is removed from toolbar - Error: gSearchInput is null ... abCommon.js Line: 588
Whiteboard: [gs]
(In reply to comment #1)
Probably related to all OS.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; nl; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

Same result.
Everything is removed from the toolbar.
> Matt, thanks for that pointer. I have merged that topic into
> http://gsfn.us/t/qfyy

How do I do that.. might as well do the job properly
(In reply to comment #8)
> > Matt, thanks for that pointer. I have merged that topic into
> > http://gsfn.us/t/qfyy
> 
> How do I do that.. might as well do the job properly

Under "Topic Options" is "Merge into" which suggests possible topics. If none of the suggestions is a good candidate, pick "choose a different topic", and then paste in the url (long or short) of the target topic.

You can give it a try, because unless I am mistaken, it looks like my merge didn't take.
Not blocking, but wanted.
blocking-thunderbird5.0: ? → -
Flags: wanted-thunderbird+
Keywords: helpwanted
I've just had the same problem as in comment #0 with Thunderbird 5. I don't understand, why this bug is still alive after about 18 months. This should really be fixed!

(In reply to comment #2)
> Not blocking on this as generally there isn't a reason to remove the quick
> search widget from the toolbar in the address book and the default mode
> works fine.

If there isn't a reason to remove the quick search widget, why is it possible to do so? (I only wanted to remove all unneeded toolbar buttons from my address book window.)
Taking this since it's a simple fix. Patch forthcoming once I've written a test for it.

(In reply to comment #12)
> If there isn't a reason to remove the quick search widget, why is it
> possible to do so? (I only wanted to remove all unneeded toolbar buttons
> from my address book window.)

Comment 2 was just saying that we're not going to stop a release if this were the last open bug, which I think is reasonable, as it's really just an annoyance.
Assignee: nobody → squibblyflabbetydoo
Status: NEW → ASSIGNED
Attached patch Fix this (no tests) (obsolete) — Splinter Review
Here's a fix for this. It really should have tests, but I'm waiting on the latest patch in bug 519956 to be checked in, as that has some generic code for modifying toolbars that I could use for this. Once that's done, it should be straightforward to write some Mozmill tests for this patch.
Attachment #544157 - Flags: review?(mbanner)
Comment on attachment 544157 [details] [diff] [review]
Fix this (no tests)

This works and fixes the bug, though there is one minor issue I spotted:

- When you put the search input back onto the toolbar, it doesn't fully work (reduce list of addresses) until you close the address book window and re-open it.

This patch is a step in the right direction though so r=me. If you want to fix that issue here please do, if not, please file a follow-up bug.
Attachment #544157 - Flags: review?(mbanner) → review+
(In reply to comment #15)
> - When you put the search input back onto the toolbar, it doesn't fully work
> (reduce list of addresses) until you close the address book window and
> re-open it.

Ah, the curse of using global variables to refer to DOM elements. I removed the references to gSearchInput and just get the DOM node when necessary now, so this should work.
Attachment #544157 - Attachment is obsolete: true
Attachment #549624 - Flags: review?
Attachment #549624 - Flags: review? → review?(mbanner)
Comment on attachment 549624 [details] [diff] [review]
Remove global variable for search box

Looks good, when you land this, can you also remove the two-line comment about gSearchInput that's here:

http://hg.mozilla.org/comm-central/diff/e4f4569d451a/mailnews/addrbook/resources/content/abResultsPane.js

Its clearly not necessary for that file for a while now.
Attachment #549624 - Flags: review?(mbanner) → review+
Checked in with comment updated: http://hg.mozilla.org/comm-central/rev/0c5f5d10b4bc
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 8.0
Keywords: helpwanted
Comment on attachment 549624 [details] [diff] [review]
Remove global variable for search box

This is probably a safe patch to take for aurora. Setting approval flag.
Attachment #549624 - Flags: approval-comm-aurora?
Comment on attachment 549624 [details] [diff] [review]
Remove global variable for search box

I have no means of proving easily, but I wonder if any extensions are going to rely on the gSearchInput value. As they may have already updated for 7, I'd prefer not to pull this across at this late stage. It'll still get released in 12 weeks when 8 gets released.
Attachment #549624 - Flags: approval-comm-aurora? → approval-comm-aurora-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: