Closed Bug 482589 Opened 15 years ago Closed 15 years ago

Find-as-you-type (TAF, FAYT) and normal Find totally fails on Javascript page

Categories

(Camino Graveyard :: General, defect)

x86
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla-graveyard, Assigned: alqahira)

References

()

Details

(Keywords: fixed1.8.1.22)

Attachments

(1 file)

STR:

1) Visit http://www.sibeliusmusic.com/html/sibeliusmusic/view/reformat.js
2) Attempt to find "write" with the normal Find command, find-as-you-type with autostart on, or FAYT with auto-start off.

ER: Finds "write" twice.

AR: Finds "write" once if used with FAYT, Cmd-G (Find Again) beeps at you. Fails to launch normal Find command at all (beeps).

Broken in latest branch nightly as well as a recent trunk nightly. I suspect this is a regression, but I'm not 100% certain.
WRT to the 1.8branch, it doesn't work in Firefox, either[1], so it's possibly a Find backend bug there.  If so, good luck with that. ([1] FAYT finds "write" once; Cmd-F won't even open the Firefox Find bar.)

On 1.9.0, Firefox 3.0.7 successfully find all 5 instances of "write", using either Cmd-F, FAYT, or some combination of those plus Cmd-G.

Question: are we preforming menu validation and only allowing Cmd-F/G/Shift-G on 'text' pages?  And said 'text' pages don't include "application/javascript"?  Note the greyed-out menu items and the beeping.
Yeah.

So, according to RFC 4329[1] Section 7, official MIME types for JS and ECMAScript are application/*, with text/* being obsolete but compatibility shims.  HTML5[2] scripting notes the default type for scripting files (when none is specified) is "text/javascript".

This blog entry[3] lists a number of additional possible variants; I suppose we may want to add them, but if they aren't RFCed or HTML-speced and don't seem common, I see no pressing reason to include them.

This patch adds the two RFC-blessed application/* types (and fixes this bug).

[1] http://www.faqs.org/rfcs/rfc4329.html
[2] http://dev.w3.org/html5/spec/Overview.html#scripting-1
[3] http://ajlcom.instantspot.com/blog/2009/02/11/Possible-javascript-file-MIME-types
Assignee: nobody → alqahira
Status: NEW → ASSIGNED
Attachment #366701 - Flags: review?(cl-bugs-new)
Comment on attachment 366701 [details] [diff] [review]
isTextBasedContent? Yes!

a=me. Ship it!
Attachment #366701 - Flags: superreview?(stuart.morgan+bugzilla)
Comment on attachment 366701 [details] [diff] [review]
isTextBasedContent? Yes!

This does seem to fix Cmd-F/G and FAYT on branch, too, fwiw; perhaps Firefox 2 just had a similar function with similar restrictions there?
Comment on attachment 366701 [details] [diff] [review]
isTextBasedContent? Yes!

sr=smorgan
Attachment #366701 - Flags: superreview?(stuart.morgan+bugzilla) → superreview+
Comment on attachment 366701 [details] [diff] [review]
isTextBasedContent? Yes!

Forgot to r+. Oops. Check it in :)
Attachment #366701 - Flags: review?(cl-bugs-new) → review+
Landed on cvs trunk.

Stuart, any objection to taking this fix in 1.6.7?
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: camino1.6.7?
Resolution: --- → FIXED
Nope
Flags: camino1.6.7? → camino1.6.7+
Landed on the MOZILLA_1_8_BRANCH in advance of 1.6.7.
Keywords: fixed1.8.1.21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: