Description:
The findbar on the view page source window performs its search on the currently selected tab.
Affected version(s):
Pale Moon 28.1.0 stable
Steps to reproduce:
View the source of any page.
Search something (it performs the search correctly here).
Focus on the main browser window and select any tab.
Go back to the view source window and press F3 or next/previous or Highlight All
Additional info:
These errors are being thrown in the Browser Console.
I’ve tested this also in a clean profile.
TypeError: prefsvc is undefined[Alamin pa]
findbar.xml:356:15
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:422:5
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:153:1
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:293:5
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:153:1
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:293:5
A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise
Date: Thu Sep 27 2018 21:31:37 GMT+0800 (Malay Peninsula Standard Time)
Full Message: TypeError: window is not a non-null object
Full Stack: getForWindow@resource://gre/modules/FinderHighlighter.jsm:170:7
FinderHighlighter.prototype.highlight<@resource://gre/modules/FinderHighlighter.jsm:205:16
TaskImpl_run@resource://gre/modules/Task.jsm:319:42
TaskImpl@resource://gre/modules/Task.jsm:277:3
asyncFunction@resource://gre/modules/Task.jsm:252:14
Finder.prototype.highlight<@resource://gre/modules/Finder.jsm:242:11
TaskImpl_run@resource://gre/modules/Task.jsm:319:42
TaskImpl@resource://gre/modules/Task.jsm:277:3
asyncFunction@resource://gre/modules/Task.jsm:252:14
toggleHighlight@chrome://global/content/bindings/findbar.xml:545:11
observe@chrome://global/content/bindings/findbar.xml:356:15
_setHighlightAll@chrome://global/content/bindings/findbar.xml:569:13
toggleHighlight@chrome://global/content/bindings/findbar.xml:534:11
oncommand@chrome://global/content/viewSource.xul:1:1
Expected result:
The search is performed only in the view source window.
Actual result:
The search is performed on the currently selected tab on the main browser window instead of on the view source window.
Screenshot:
I’m not doing the same search on that tab.
**Description:**
The findbar on the view page source window performs its search on the currently selected tab.
**Affected version(s):**
Pale Moon 28.1.0 stable
**Steps to reproduce:**
1. View the source of any page.
2. Search something (it performs the search correctly here).
3. Focus on the main browser window and select any tab.
4. Go back to the view source window and press F3 or next/previous or Highlight All
**Additional info:**
These errors are being thrown in the Browser Console.
I've tested this also in a clean profile.
```
TypeError: prefsvc is undefined[Alamin pa]
findbar.xml:356:15
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:422:5
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:153:1
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:293:5
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:153:1
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:293:5
A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise
Date: Thu Sep 27 2018 21:31:37 GMT+0800 (Malay Peninsula Standard Time)
Full Message: TypeError: window is not a non-null object
Full Stack: getForWindow@resource://gre/modules/FinderHighlighter.jsm:170:7
FinderHighlighter.prototype.highlight<@resource://gre/modules/FinderHighlighter.jsm:205:16
TaskImpl_run@resource://gre/modules/Task.jsm:319:42
TaskImpl@resource://gre/modules/Task.jsm:277:3
asyncFunction@resource://gre/modules/Task.jsm:252:14
Finder.prototype.highlight<@resource://gre/modules/Finder.jsm:242:11
TaskImpl_run@resource://gre/modules/Task.jsm:319:42
TaskImpl@resource://gre/modules/Task.jsm:277:3
asyncFunction@resource://gre/modules/Task.jsm:252:14
toggleHighlight@chrome://global/content/bindings/findbar.xml:545:11
observe@chrome://global/content/bindings/findbar.xml:356:15
_setHighlightAll@chrome://global/content/bindings/findbar.xml:569:13
toggleHighlight@chrome://global/content/bindings/findbar.xml:534:11
oncommand@chrome://global/content/viewSource.xul:1:1
```
**Expected result:**
The search is performed only in the view source window.
**Actual result:**
The search is performed on the currently selected tab on the main browser window instead of on the view source window.
**Screenshot:**

I'm not doing the same search on that tab.
It will need the findbar browser property set to the active window when the source window is selected. Should be a straightforward fix similar to a744d76655
It will need the findbar browser property set to the active window when the source window is selected. Should be a straightforward fix similar to a744d76655f08a2812270da0c459126428c5786d
STR don’t result in the wrong browser for me. it will search in the source window.
I’ve tried opening the find bar in the browser window and swapping between tabs etc -- nothing makes it
search there instead of the focused source window. No errors are thrown in the console.
I've been trying to reproduce this and I can't.
STR don't result in the wrong browser for me. it will search in the source window.
I've tried opening the find bar in the browser window and swapping between tabs etc -- nothing makes it
search there instead of the focused source window. No errors are thrown in the console.
It makes very little sense that _fastFind errors are thrown because that code was restored when moving the findbar back to the global window. The _fastFind field should therefore exist.
It makes very little sense that `_fastFind` errors are thrown because that code was restored when moving the findbar back to the global window. The `_fastFind` field should therefore exist.
I’ve been able to reproduce it but with an extra step:
3a. navigate to a different page
This makes the actual page the source view is for no longer present. At that point, trying to search in the source window will not work, and searching will be done in the (new) page content.
EDIT: I do not see the thrown errors in the browser console, though.
I've been able to reproduce it but with an extra step:
3a. navigate to a different page
This makes the actual page the source view is for no longer present. At that point, trying to search in the source window will not work, and searching will be done in the (new) page content.
EDIT: I do not see the thrown errors in the browser console, though.
@janekptacijarabaci in #513 it seems you’ve rolled several different things into one. Perhaps because it was all backed out, since they weren’t separate commits, we’ve lost some code that would be important to keep (like the focus() part?). Could you have a look at this problem, please, and see if you can find out what is going on here?
@janekptacijarabaci in #513 it seems you've rolled several different things into one. Perhaps because it was all backed out, since they weren't separate commits, we've lost some code that would be important to keep (like the focus() part?). Could you have a look at this problem, please, and see if you can find out what is going on here?
The _fastFind errors seem to get thrown when you try to open the find bar again in the tab where the view source window was opened; the global find bar can’t be opened in that tab.
Here’s the content the error shows when I click the drop-down menu:
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:293:5
enableSelection resource://gre/modules/Finder.jsm:293:5
onxblblur chrome://global/content/bindings/findbar.xml:115:9
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:153:1
set caseSensitive resource://gre/modules/Finder.jsm:153:1
_updateCaseSensitivity chrome://global/content/bindings/findbar.xml:617:11
_find chrome://global/content/bindings/findbar.xml:1025:13
onxblinput chrome://global/content/bindings/findbar.xml:82:9
The ```_fastFind``` errors seem to get thrown when you try to open the find bar again in the tab where the view source window was opened; the global find bar can't be opened in that tab.
Here's the content the error shows when I click the drop-down menu:
```
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:293:5
enableSelection resource://gre/modules/Finder.jsm:293:5
onxblblur chrome://global/content/bindings/findbar.xml:115:9
TypeError: this._fastFind is null[Alamin pa]
Finder.jsm:153:1
set caseSensitive resource://gre/modules/Finder.jsm:153:1
_updateCaseSensitivity chrome://global/content/bindings/findbar.xml:617:11
_find chrome://global/content/bindings/findbar.xml:1025:13
onxblinput chrome://global/content/bindings/findbar.xml:82:9
```
This code seems to set the incorrect browser for the View Source window’s find bar.
I found a much easier STR: press Escape button at least twice on the view source window and search will be broken.
@wolfbeast
Applying 38f30cdf759e4f6da96da777c3216b5047d672c1 from PR #514 seems to fix the issue on my end.
* This code seems to set the incorrect browser for the View Source window's find bar.
* I found a much easier STR: press Escape button at least twice on the view source window and search will be broken.
Description:
The findbar on the view page source window performs its search on the currently selected tab.
Affected version(s):
Pale Moon 28.1.0 stable
Steps to reproduce:
Additional info:
These errors are being thrown in the Browser Console.
I’ve tested this also in a clean profile.
Expected result:
The search is performed only in the view source window.
Actual result:
The search is performed on the currently selected tab on the main browser window instead of on the view source window.
Screenshot:
I’m not doing the same search on that tab.
It will need the findbar browser property set to the active window when the source window is selected. Should be a straightforward fix similar to
a744d76655I’ve been trying to reproduce this and I can’t.
STR don’t result in the wrong browser for me. it will search in the source window.
I’ve tried opening the find bar in the browser window and swapping between tabs etc -- nothing makes it
search there instead of the focused source window. No errors are thrown in the console.
It makes very little sense that
_fastFinderrors are thrown because that code was restored when moving the findbar back to the global window. The_fastFindfield should therefore exist.I’ve been able to reproduce it but with an extra step:
3a. navigate to a different page
This makes the actual page the source view is for no longer present. At that point, trying to search in the source window will not work, and searching will be done in the (new) page content.
EDIT: I do not see the thrown errors in the browser console, though.
@janekptacijarabaci in #513 it seems you’ve rolled several different things into one. Perhaps because it was all backed out, since they weren’t separate commits, we’ve lost some code that would be important to keep (like the focus() part?). Could you have a look at this problem, please, and see if you can find out what is going on here?
The
_fastFinderrors seem to get thrown when you try to open the find bar again in the tab where the view source window was opened; the global find bar can’t be opened in that tab.Here’s the content the error shows when I click the drop-down menu:
@wolfbeast
Applying
38f30cdf75from PR #514 seems to fix the issue on my end.Thanks for digging into this! Re-applied the patch, verification would be nice.