Closed Bug 296827 Opened 19 years ago Closed 19 years ago

Dragging & dropping text into the Find text box does not enable search buttons or initiate search.

Categories

(Toolkit :: Find Toolbar, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.8final

People

(Reporter: paul.farmer, Assigned: jorgev)

References

Details

(Keywords: fixed1.8)

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Dropping text (which has been selected and dragged from elsewhere, including the
displayed webpage or another application) into the Find toolbar text box does
not enable the search buttons nor does it initiate the search. Subsequently
giving focus to the text box by clicking into it with the mouse doesn't enable
the buttons, and neither does moving the cursor within the text box with the
cursor keys once it has focus. Only when a further character or backspace is
typed from the keyboard are the buttons enabled.

Reproducible: Always

Steps to Reproduce:
I think I've explained it pretty well above, but here goes:
1. Display the Find toolbar.
2. From the displayed webpage or another application window displaying text,
select some text, then (button 1) click and drag the selected text to the Find
toobar text box.
3. Release the mouse button to drop the selected text into the text box.
4. Note that no search has been initiated and that the search buttons in the
toolbar are disabled.
5. Give focus to the text box in any way you like.
6. Note that you are no further forward.
7. Type a character from the keyboard while the textbox has focus. Note the
miraculous enabling of the search buttons.

Actual Results:  
I made some tea.

Expected Results:  
I'm getting bored now.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050606
Firefox/1.0+ ID:2005060607

confirmed ->NEW

one would expect the same behaviour as for searchbar
Status: UNCONFIRMED → NEW
Ever confirmed: true
This patch is based on the drag-and-drop behavior done for the URLBar in
http://lxr.mozilla.org/aviary101branch/source/browser/base/content/browser.js
Attachment #185742 - Flags: review?
Comment on attachment 185742 [details] [diff] [review]
Drag and drop event handler added to find bar

Find bar component is also used in Help, View Source and View Source Selection.
Corresponding XUL files need to include nsDragAndDrop.js. A fixed patch is on
the way.
Attachment #185742 - Attachment is obsolete: true
Attachment #185742 - Flags: review?
Update of previous patch. Added include for nsDragAndDrop.js for Help and View
Source XUL files.
Attachment #185838 - Flags: review?
Comment on attachment 185838 [details] [diff] [review]
D&d for find bar in browser, view source and help

You need to ask review from someone specifically.
Attachment #185838 - Flags: review? → review?(mconnor)
*** Bug 297989 has been marked as a duplicate of this bug. ***
Blocks: 296872
Flags: blocking-aviary1.1?
Not a blocker, will look at patch rsn.
Flags: blocking-aviary1.1? → blocking-aviary1.1-
+      // XXXBlake Workaround caret crash when you try to set the textbox's
value on dropping
+      setTimeout(function(u) { findField.value = u; find(u); }, 0, aXferData.data);
This workaround is not necessary anymore since bug 296464 got fixed.
Comment on attachment 185838 [details] [diff] [review]
D&d for find bar in browser, view source and help

r=me, but the textbox crash is no more, I already removed the timeout from
where you cribbed that bit, so just remove the timeout and we're good to go.
Attachment #185838 - Flags: review?(mconnor) → review+
Eliminated timeout workaround as per comments #8 and #9.
Attachment #185838 - Attachment is obsolete: true
Attachment #196459 - Flags: review?(mconnor)
Attachment #196459 - Flags: review?(mconnor) → review+
Whiteboard: [checkin needed]
Assignee: nobody → jorge.villalobos
mozilla/toolkit/components/help/content/help.xul; new revision: 1.28;
mozilla/toolkit/components/typeaheadfind/content/findBar.js; new revision: 1.27;
mozilla/toolkit/components/viewsource/content/viewPartialSource.xul; new
revision: 1.21;
mozilla/toolkit/components/viewsource/content/viewSource.xul; new revision: 1.25;
Status: NEW → RESOLVED
Closed: 19 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → Firefox1.6-
Version: unspecified → Trunk
Attachment #196459 - Flags: approval1.8b5?
Flags: blocking1.8b5?
Flags: blocking1.8b5? → blocking1.8b5+
Comment on attachment 196459 [details] [diff] [review]
D&d patch without timeout workaround

Per bug meeting - approved for 1.8b5 branch.
Attachment #196459 - Flags: approval1.8b5? → approval1.8b5+
1.8 Branch:
mozilla/toolkit/components/help/content/help.xul 1.26.2.1
mozilla/toolkit/components/typeaheadfind/content/findBar.js 1.21.2.6
mozilla/toolkit/components/viewsource/content/viewPartialSource.xul 1.20.2.1
mozilla/toolkit/components/viewsource/content/viewSource 1.24.2.1
Keywords: fixed1.8
Target Milestone: Firefox1.6- → Firefox1.5
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: