selection should be automatically copied to Find dialog

RESOLVED WONTFIX

Status

--
enhancement
RESOLVED WONTFIX
17 years ago
8 years ago

People

(Reporter: tobias.weibel, Assigned: tobias.weibel)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.6+)
Gecko/20011213
BuildID:    2001121303

Select a text on a homepage and press Ctrl+F. Then the marked text should be
copied automatically into the "Find in This File" dialogue.
I think this is a useful feature.

Comment 1

17 years ago
-> sgehani
Assignee: hyatt → sgehani
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → mozilla1.0.1

Comment 2

17 years ago
-> XPApps: GUI Features
Assignee: sgehani → blakeross
Component: XP Toolkit/Widgets → XP Apps: GUI Features
QA Contact: jrgm → sairuh
Target Milestone: mozilla1.0.1 → ---
(Assignee)

Comment 3

17 years ago
Created attachment 63075 [details] [diff] [review]
I have written a patch. It is my first mozilla javascript, so check it well.
(Assignee)

Comment 4

17 years ago
It would be nice if this feature goes into moz 0.9.8 .

Updated

17 years ago
Target Milestone: --- → mozilla0.9.9
mass moving open bugs pertaining to find in page/frame to pmac@netscape.com as
qa contact.

to find all bugspam pertaining to this, set your search string to
"AppleSpongeCakeWithCaramelFrosting".
QA Contact: sairuh → pmac

Comment 6

17 years ago
-> ui design
Assignee: blaker → mpt
Component: XP Apps: GUI Features → User Interface Design
QA Contact: pmac → zach
Target Milestone: mozilla0.9.9 → ---
(Assignee)

Comment 7

17 years ago
It would be nice if this feature goes into moz 1.0 . Attachment 63075 [details] [diff] works well
for me.

Updated

17 years ago
Keywords: patch, review

Comment 8

17 years ago
I've been using Tobias' patch for a couple of days now both on CVS builds and
0.9.9, both on W2K, without any problems.

It would be good to see this committed soon. Under Windows at least it adds
"standard behaviour" to the Find mechanism - most (all?) Windows programs open
the Find dialogue with any selected text pasted into the Find: textbox.
Comment on attachment 63075 [details] [diff] [review]
I have written a patch. It is my first mozilla javascript, so check it well.

Should the selectedStr override gFindInst.searchString (passed as an argument)?
If not then don't calculate it if you don't need to.
I don't like your choice of replaces, I would use 1) /^\s+/, "" 2) /\s+$/, ""
(also you forgot the space after the comma) 3) /\s+/g, " " which collapses all
whitespace runs to a single space. I do this because a single space will match
any amount of whitespace.
I don't like the whitespace differences at lines 115/124 and 126/135.
I also doesn't like the way the dialog uses x ? x : y when it means x || y but
that's not your fault. Oh, and if anyone wants to comment on my comments please
CC me as well :-)

Comment 10

17 years ago
personally, i think i prefer /\s\s+/g, " " (note the second \s)	
(Assignee)

Comment 11

17 years ago
Created attachment 76034 [details] [diff] [review]
second try

selectedStr mustn't override gFindInst.searchString

I hope my choice of replaces are better now.

Updated

17 years ago
Summary: RFE: The marked text should be copied automatically into the search dialogue (Find in this page). → selection should be automatically copied to Find dialog

Comment 12

17 years ago
I wouldn't call this standard behavior for Windows apps. I'm on Windows 2000,
and I am unable to find a single web browser that does this. I have tested
Mozilla, IE, Opera, Netscape Communicator and Amaya. (Yes, I am aware that Amaya
doesn't really count.)
+  dialog.findKey.value           = selectedStr ? selectedStr :
+                                   (gFindInst.searchString ?
gFindInst.searchString : findService.searchString);

doesn't that mean that selectedStr will override the last search string?
(Assignee)

Comment 14

17 years ago
> doesn't that mean that selectedStr will override the last search string?

The last search string will be overwritten if selectedStr contains at least one
character. Otherwise the last search string will be used. 

Did I understand you correctly? (My english skills are not very good...)
(Assignee)

Comment 15

17 years ago
Created attachment 85038 [details] [diff] [review]
patch v3 (included feedback from several people)

patch 63075 and 76034 are obsolete.

thanks to neil@parkwaycc.co.uk

Comment 16

17 years ago
As per my comment 8 Tobias' patch has been working well for a few months now.
This really should be committed and this bug closed.

Updated

17 years ago
Attachment #76034 - Attachment is obsolete: true

Updated

17 years ago
Attachment #63075 - Attachment is obsolete: true

Updated

17 years ago
Blocks: 123569

Comment 17

17 years ago
if at all possible, i'd like to be able to access the previous search string
(ctrl-z or down would be fine), but if necessary i can find/file a bug for that...
Assignee: mpt → blaker
Component: User Interface Design → XP Apps: GUI Features
QA Contact: zach → paw

Comment 18

17 years ago
I agree with timeless that this would be a good feature but I believe that
Tobias' patch addresses the subject of this bug (and it works reliably) and so
should be committed.

A search history, which is in keeping with Windows (don't know about other
platforms) is a separate issue and should be filed as a new bug/RFE.

(Assignee)

Comment 19

17 years ago
blaker: could you review my last patch (attachement 85038) please?

timeless: you're able to access the previous search string if you don't select a
word an hit ctrl+f.
(Assignee)

Updated

17 years ago
Attachment #85038 - Flags: review?(blaker)

Updated

15 years ago
Assignee: firefox → tobias.weibel

Updated

15 years ago
Attachment #85038 - Flags: review?(firefox) → review?(neil.parkwaycc.co.uk)
Product: Core → Mozilla Application Suite

Comment 20

13 years ago
Sister bug for Firefox: bug 250910

Updated

11 years ago
Component: XP Apps: GUI Features → UI Design

Comment 21

8 years ago
We now have the Firefox/Toolkit findbar on trunk. so WFM.
On the SeaMonkey 2.0 branch we are only accepting security and stability patches so WONTFIX.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
Comment on attachment 85038 [details] [diff] [review]
patch v3 (included feedback from several people)

(Update patch to current Hg/code and re-request review, if need be.)
Attachment #85038 - Flags: review?(neil)
You need to log in before you can comment on or make changes to this bug.