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.
Proposed fix for DragDataProducer handling links, ignore linkNode when there is selected content.
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-
(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)
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
Neil, can you please run this through Try first? :)
I checked this in. https://hg.mozilla.org/integration/mozilla-inbound/rev/6213e808b5df
(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: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
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
You need to log in before you can comment on or make changes to this bug.