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

VERIFIED FIXED in mozilla32

Status

()

defect
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: ke5trel, Assigned: ke5trel)

Tracking

Trunk
mozilla32
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [testday-20140731] )

Attachments

(1 attachment, 1 obsolete attachment)

5.96 KB, patch
enndeakin
: review+
Details | Diff | Splinter Review
Assignee

Description

5 years ago
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.
Assignee

Updated

5 years ago
See Also: → 296872
Assignee

Comment 1

5 years ago
Posted patch bug998278.patch (obsolete) — Splinter Review
Proposed fix for DragDataProducer handling links, ignore linkNode when there is selected content.
Assignee

Updated

5 years ago
Attachment #8408997 - Flags: review?(enndeakin)
Assignee

Updated

5 years ago
Attachment #8408997 - Flags: review?(enndeakin) → review?(vladimir)

Comment 2

5 years ago
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-
Assignee

Updated

5 years ago
Attachment #8408997 - Attachment is obsolete: true
Assignee

Comment 3

5 years ago
(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)

Updated

5 years ago
Attachment #8420034 - Flags: review?(enndeakin) → review+

Comment 4

5 years ago
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
Assignee

Updated

5 years ago
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.)
Assignee

Comment 9

5 years ago
(In reply to Neil Deakin from comment #7)
> I checked this in.

Thanks
https://hg.mozilla.org/mozilla-central/rev/6213e808b5df
Status: ASSIGNED → RESOLVED
Closed: 5 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.