Closed Bug 419967 Opened 16 years ago Closed 16 years ago

Cannot search in application/javascript page

Categories

(Toolkit :: Find Toolbar, defect, P2)

x86
All
defect

Tracking

()

VERIFIED FIXED
mozilla1.9

People

(Reporter: mossop, Assigned: mconnor)

References

()

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

When viewing a plain text document the find bar will not open. The menu options in edit are greyed out, access keys just beep at me leaving me sad and frustrated.
Flags: blocking-firefox3?
Is this Mac-specific?

In any case I can't reproduce it.

I used TextWrangler to create a text document with a couple of
paragraphs of "This is some text.", repeated multiple times.  Then I
saved it using the Mac OS Roman character set and Unix line breaks.
Then I opened it in todays Minefield OS X nightly (File : Open), and
had no trouble searching in it.

Right-slash ('/') and command-f both opened the Find bar, which worked
perfectly.  Edit : Find also worked.
I should mention that I saved my file as a *.txt file.
Dtownsend, please tell me more about how to reproduce this problem.
Otherwise I'll have to resolve it WFM or INCOMPLETE.
Go to this url:

http://www.oxymoronical.com/experiments/tindermerge/tindermerge.js

Try to search using '/', command-f or the find menu item. Fail.
(In reply to comment #3)
> WFM on Vista

Err, no it doesn't.
Flags: blocking-firefox3? → blocking-firefox3+
OS: Mac OS X → All
Priority: -- → P2
Target Milestone: --- → Firefox 3
(In reply to comment #5)

Bingo!  Thanks.

This also happens in Windows (as beltzner has noted).

It's an odd problem, though.  If I copy tindermerge.js to my own
Apache server and access it there, I don't see this problem.  Possibly
there's something wrong with the way it's being served by
oxymoronical.

However that may be, though, this is still a bug in Firefox.
Flags: blocking-firefox3+ → blocking-firefox3?
OS: All → Mac OS X
Priority: P2 → --
Target Milestone: Firefox 3 → ---
Silly bugzilla.
OS: Mac OS X → All
Priority: -- → P2
Target Milestone: --- → Firefox 3
The server it is on is a standard dreamhost account so I'm not sure there is anything fancy going on with it. Headers are:

Date: Mon, 03 Mar 2008 17:10:25 GMT
Server: Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2
Last-Modified: Tue, 19 Feb 2008 23:52:10 GMT
Etag: "31dd492-1e02-8f92be80"
Accept-Ranges: bytes
Content-Length: 7682
Keep-Alive: timeout=2, max=100
Connection: Keep-Alive
Content-Type: application/javascript
My Apache server sends it as type application/x-javascript.

Could that make the difference?
Flags: blocking-firefox3? → blocking-firefox3+
> Could that make the difference?

It does.
Summary: Cannot search in a plain text page → Cannot search in application/javascript page
Attached patch fix slightly naive isImage check (obsolete) — Splinter Review
Probably should look at this a little harder at some point, but good enough for now.  Stupidly obvious...
Attachment #307777 - Flags: review?(gavin.sharp)
Comment on attachment 307777 [details] [diff] [review]
fix slightly naive isImage check

Add this to the one in findbar.xml, too?
Attachment #307777 - Flags: review?(gavin.sharp) → review+
SeaMonkey will probably want to fix theirs as well.
also added a comment to check the other method to both places.  Really wish this was factored better, but not the time to do code cleanup.
Attachment #307777 - Attachment is obsolete: true
Checked in.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
(In reply to comment #15)
> SeaMonkey will probably want to fix theirs as well.
Filed bug 421365 for it.
Verified fixed using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b5pre) Gecko/2008030704 Minefield/3.0b5pre and the Win XP nightly. Verified using the site referenced in Comment 5.
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: