Closed Bug 998278 Opened 12 years ago Closed 12 years ago

Dragging a text selection made within a link transfers the url and not the selected text.

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla32

People

(Reporter: ke5trel, Assigned: ke5trel)

References

Details

(Whiteboard: [testday-20140731] )

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20140314220517 Steps to reproduce: 1. Make a text selection within a link, don't include any plain text outside the link. 2. Drag the selected text, note that the drag image matches the text selection. 3. Drop selection into any text box. Actual results: The transferred data is the link url rather than the selected text. Expected results: Tested IE11, Chrome 34, Opera Next 21 & Safari 5.1.7 and none of them have this behavior, they all transfer the selected text as you would expect.
See Also: → 296872
Attached patch bug998278.patch (obsolete) — Splinter Review
Proposed fix for DragDataProducer handling links, ignore linkNode when there is selected content.
Attachment #8408997 - Flags: review?(enndeakin)
Attachment #8408997 - Flags: review?(enndeakin) → review?(vladimir)
Comment on attachment 8408997 [details] [diff] [review] bug998278.patch The current behaviour is actually how it was designed, but I agree that it isn't that logical. We currently require the alt key to be pressed to drag the text instead of the link itself. While this patch here will fix the specific issue, the proper fix would be to remove the GetSelectedLink method and then clean up some of the places where the alt key check is done in that same file.
Attachment #8408997 - Flags: review?(vladimir) → review-
Attachment #8408997 - Attachment is obsolete: true
(In reply to Neil Deakin from comment #2) > The current behaviour is actually how it was designed That explains a lot, I was not expecting this so was rather confused. > We currently require the alt key to be pressed to drag > the text instead of the link itself. This doesn't work for me. Holding the alt key prevents dragging the text of a link selection and the code appears to reflect this (returns prematurely without data transfer). I've revised the patch according to your suggestions.
Attachment #8420034 - Flags: review?(enndeakin)
Attachment #8420034 - Flags: review?(enndeakin) → review+
Thanks for the patch. If you need help checking this in, you can set the checkin-needed keyword.
Assignee: nobody → kestrel
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: checkin-needed
Neil, can you please run this through Try first? :)
Keywords: checkin-needed
(In reply to Neil Deakin from comment #2) > We currently require the alt key to be pressed to drag > the text instead of the link itself. I always thought that we required the alt key to be pressed to select text inside the link instead of dragging the link; at least, that's how it works for me. (I didn't try dragging the selected text though, I'm more used to copy & paste.)
(In reply to Neil Deakin from comment #7) > I checked this in. Thanks
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
QA Whiteboard: [good first verify]
Reproduced the issue on Nightly (2014-04-18) buildID: 20140418030202, verified as fixed on: Firefox 32.0 Beta 2 (buildID: 20140728123914) using Windows 7 64bit.
Status: RESOLVED → VERIFIED
Whiteboard: [testday-20140731]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: