Closed Bug 1320095 Opened 8 years ago Closed 7 years ago

Error: TypeError: this.browser.finder.onFindbarOpen is not a function Source File: chrome://global/content/bindings\findbar.xml Line: 738 ("Whole Words" option does not work)

Categories

(SeaMonkey :: Find In Page, defect)

SeaMonkey 2.48 Branch
defect
Not set
normal

Tracking

(seamonkey2.47 fixed, seamonkey2.48 fixed, seamonkey2.49esr fixed, seamonkey2.50 fixed)

RESOLVED FIXED
seamonkey2.47
Tracking Status
seamonkey2.47 --- fixed
seamonkey2.48 --- fixed
seamonkey2.49esr --- fixed
seamonkey2.50 --- fixed

People

(Reporter: philip.chee, Assigned: philip.chee)

References

Details

Attachments

(3 files)

> http://logs.glob.uno/?c=mozilla%23seamonkey&s=23+Nov+2016&e=23+Nov+2016#c679022
> 17:23	frg_away In 2.48:
Error: TypeError: this.browser.finder.onFindbarOpen is not a function
Source File: chrome://global/content/bindings\findbar.xml
Line: 738
> -          highlight: function(aHighlight, aWord) {
> -            this.finder.highlight(aHighlight, aWord);
> +          highlight: function(...args) {
> +            this.finder.highlight(...args);
Use rest and spread operators so that we don't need to change our code if the number of arguments changes.

> +          prefsvc.removeObserver("findbar.entireword", this._observer);
> +          prefsvc.removeObserver("findbar.highlightAll", this._observer);
> +          prefsvc.removeObserver("findbar.modalHighlight", this._observer);
> +
....
> +          // Clear all timers that might still be running.
> +          this._cancelTimers();
We override the "destroy" method so we need to do everything that the original does.

I tried using an ES6 Proxy() but got bogged down. I may do this in a future enhancement bug.
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #8814090 - Flags: feedback?(iann_bugzilla)
Attachment #8814090 - Flags: feedback?(frgrahl)
Comment on attachment 8814090 [details] [diff] [review]
Add missing forwarders to the finder object

Looks overall good. No more error are reported. 'Highlight All' and 'Match Case work' but the option 'Whole Words' is broken. Seems to do nothing.

Tested 2.49a2 Windws 7 x64.

Compared the behaviour of the 'Whole Word' option with Firefox 51 beta 3.

FRG
Attachment #8814090 - Flags: feedback?(frgrahl) → feedback+
Attachment #8814090 - Flags: feedback?(iann_bugzilla) → review?(iann_bugzilla)
Comment on attachment 8814090 [details] [diff] [review]
Add missing forwarders to the finder object

r/a=me
Do we know what checkin broke this? Was it from bug 1055508?
Attachment #8814090 - Flags: review?(iann_bugzilla) → review+
Pushed http://hg.mozilla.org/comm-central/rev/541426af1900
http://hg.mozilla.org/comm-central/rev/541426af19003961a9c36fb776b33e261a191840

(In reply to Ian Neal from comment #3)
> Do we know what checkin broke this? Was it from bug 1055508?
Well Neil was being clever as usual. He was trying to proxy the toolkit finder object. But his solution is fragile because if the finder signature changed (like it did) new functionality would be broken. Essentially he was trying to do a ES6 Proxy without actually using a ES6 Proxy.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.50
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
> 'Whole Words' is broken. Seems to do nothing.
I found a typo in my patch which is probably why it's not working.
Attachment #8817794 - Flags: review?(frgrahl)
Comment on attachment 8817794 [details] [diff] [review]
Fix typo s/aEntireWord/entireWord/

r=me
Attachment #8817794 - Flags: review?(frgrahl) → review+
should be put into the branches too.
Keywords: leave-open
Comment on attachment 8817794 [details] [diff] [review]
Fix typo s/aEntireWord/entireWord/

Pushed to comm-central: http://hg.mozilla.org/comm-central/rev/bb630196e493
comm-central changeset bb630196e49350201ed7d9881a12362f08db895e
As discussed on irc. Unified both patches and tested them on 2.48 and 2.49. The original patches would also apply clean. No changes needed.
Attachment #8822765 - Flags: approval-comm-beta?
Attachment #8822765 - Flags: approval-comm-aurora?
Comment on attachment 8822765 [details] [diff] [review]
Unified branch patch

r=me a=me for comm-aurora and comm-beta. And maybe comm-release if we are doing a 2.47 release.
Attachment #8822765 - Flags: approval-comm-release+
Attachment #8822765 - Flags: approval-comm-beta?
Attachment #8822765 - Flags: approval-comm-beta+
Attachment #8822765 - Flags: approval-comm-aurora?
Attachment #8822765 - Flags: approval-comm-aurora+
Status: REOPENED → ASSIGNED
Keywords: leave-open
Works really fine with Server-Installation of  unofficial (by FRG) en-US SeaMonkey 2.50a1 (NT 6.1; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0 Build 20161219235428  (Default Classic Theme) on German WIN7 64bit, until now no bigger problem found with "Highlight All", "Match Case", "Whole Words"

Only some smaller problems found with quotation marks,here "Whole Words" only works correct for basic Quotation marks. For details see RFE "Bug 1328117 - Improve "Whole Words" option for strings in quotation marks"
Summary: Error: TypeError: this.browser.finder.onFindbarOpen is not a function Source File: chrome://global/content/bindings\findbar.xml Line: 738 → Error: TypeError: this.browser.finder.onFindbarOpen is not a function Source File: chrome://global/content/bindings\findbar.xml Line: 738 ("Whole Words" option does not work
Summary: Error: TypeError: this.browser.finder.onFindbarOpen is not a function Source File: chrome://global/content/bindings\findbar.xml Line: 738 ("Whole Words" option does not work → Error: TypeError: this.browser.finder.onFindbarOpen is not a function Source File: chrome://global/content/bindings\findbar.xml Line: 738 ("Whole Words" option does not work)
https://hg.mozilla.org/releases/comm-aurora/rev/117d52323f97b2e2acf992df6ee26b6c69922859
https://hg.mozilla.org/releases/comm-beta/rev/d6e95ef2feed7c8bb96b40f2b747972dbd51b11c

2.47 did show only some of the errors but the patch fixed them and did not contain regressions so it has been pushed here too:

https://hg.mozilla.org/releases/comm-release/rev/0847155e32f1154c7d408e4cd1d89d9b65a04028
Status: ASSIGNED → RESOLVED
Closed: 8 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: seamonkey2.50 → seamonkey2.47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: