Closed Bug 1615239 Opened 1 year ago Closed 1 year ago

Clear search history in SeaMonkey search box is not working

Categories

(SeaMonkey :: Search, task)

task
Not set
normal

Tracking

(seamonkey2.49esr unaffected, seamonkey2.53 fixed, seamonkey2.57esr fixed)

RESOLVED FIXED
seamonkey 2.72
Tracking Status
seamonkey2.49esr --- unaffected
seamonkey2.53 --- fixed
seamonkey2.57esr --- fixed

People

(Reporter: frg, Assigned: frg)

References

(Regression)

Details

(Whiteboard: SM2.53.1)

Attachments

(1 file, 1 obsolete file)

Reported over irc:
TypeError: this.FormHistory is undefined[Learn More] search.xml:600:15

NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "this.FormHistory is undefined" {file: "chrome://communicator/content/search/search.xml" line: 600}]'[JavaScript Error: "this.FormHistory is undefined" {file: "chrome://communicator/content/search/search.xml" line: 600}]' when calling method: [nsIController::doCommand]

Bug 1442925 moved the import to the searchbar but I am still puzzled why 2.57 does not throw. Probably it does not because there are still bugs in it and the code is not called. The autocomplete is only semi working (blank line at the start of the popup among other problems).

Attached patch 1615239-searchclear.patch (obsolete) — Splinter Review

Does not work for clearing search from the sidebar yet.

[Approval Request Comment]
Regression caused by (bug #): 1442925
User impact if declined: clearing search histroy does not work. Needs to be cleared in the data manager
Testing completed (on m-c, etc.): 2.53 2.57(has issues)
Risk to taking this patch (and alternatives if risky): none already broken.
String changes made by this patch: --

The safest approach seems to be an additional FormHistory import in the text box. It was done differently with just an import before Bug 1442925 but seems to be cleaner using a field now.
At least the sidebar search field does not habe a searchbar and also not a parent Binding (second problem discovered and fixed) so we can't just use the Formhistory from the searchbar.

Does not throw in 2.57 but also not removing history because of other problems which need to be fixed first. The patch should then work fine for it too.

Btw. just opening a customize toolbar box constructs a search box but never calls the destructor. Something to fix for later and not related to the existing bugs here.

Attachment #9126384 - Attachment is obsolete: true
Attachment #9126436 - Flags: review?(iann_bugzilla)
Attachment #9126436 - Flags: approval-comm-release?
Attachment #9126436 - Flags: approval-comm-esr60?
Comment on attachment 9126436 [details] [diff] [review]
1615239-searchclear.patch

[Triage Comment]
LGTM r/a=me
Attachment #9126436 - Flags: review?(iann_bugzilla)
Attachment #9126436 - Flags: review+
Attachment #9126436 - Flags: approval-comm-release?
Attachment #9126436 - Flags: approval-comm-release+
Attachment #9126436 - Flags: approval-comm-esr60?
Attachment #9126436 - Flags: approval-comm-esr60+

Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/915e5658d0b9
Define FormHistory in the search textbox and don't assume that a search bar exists. r=IanN

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Whiteboard: SM2.53.1
You need to log in before you can comment on or make changes to this bug.