Closed Bug 721417 Opened 12 years ago Closed 12 years ago

Can't drag and drop URL into about:newtab

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 13

People

(Reporter: jsocol, Assigned: ttaubert)

References

Details

(Whiteboard: [qa!])

Attachments

(1 file)

Dragging and dropping a URL into blank space in about:newtab doesn't load the URL. Dropping it on the location bar or tab does.

STR:
1) Open about:newtab
2) Drag a URL from another application
3) Drop it in empty space (i.e. don't add it to the list of sites)

Expected:
URL loads in tab

Actual:
Nothing happens


Using the latest Nightly builds on Windows 7 (checked both the 32- and 64-bit builds).
Blocks: 455553
Similarly, there's no effect when you drag-and-drop an HTML file or an XPI file onto about:newtab.  (the latter is mentioned in bug 722672)

Note that this works in both about:blank and at "real" web pages (e.g. at http://google.com ).
(that is to say, the dropped file gets loaded)
Setting OS --> All, as I'm encountering this on Linux as well
Mozilla/5.0 (X11; Linux x86_64; rv:13.0a1) Gecko/20120203 Firefox/13.0a1

Also: this seems to work correctly in at least one instance -- drag-and-drop of a highlighted text selection. If I have a URL in thunderbird or gedit, I can highlight the text of the URL and drag-and-drop that *selection* into about:newtab, and the URL will be loaded.  (It doesn't work if I drag an *un-highlighted* linkified URL from thunderbird, though, as noted in comment 0.)
OS: Windows 7 → All
Version: unspecified → Trunk
Blocks: 722672
Assignee: nobody → ttaubert
Status: NEW → ASSIGNED
Attached patch patch v1Splinter Review
When dragging new tab sites we need a Mac specific workaround to prevent a 500ms delay before the tab gets dropped. There are two changes:

1) This workaround is now really Mac specific (#ifdef).
2) We only need this when dragging a 'site', not for external drops.
Attachment #594443 - Flags: review?(fryn)
Forgot to mention that (2) is the actual culprit because why we currently don't accept drops properly.
Status: ASSIGNED → NEW
OS: All → Windows 7
Target Milestone: --- → Firefox 12
Comment on attachment 594443 [details] [diff] [review]
patch v1

Review of attachment 594443 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/newtab/page.js
@@ +91,4 @@
>        // Workaround to prevent a delay on MacOSX due to a slow drop animation.
>        let doc = document.documentElement;
>        doc.addEventListener("dragover", this.onDragOver, false);
>        doc.addEventListener("drop", this.onDrop, false);

I think this could just be document.addEventListener instead of doc.addEventListener
Attachment #594443 - Flags: review?(fryn) → review+
https://hg.mozilla.org/integration/fx-team/rev/097b38220aa7
Status: NEW → ASSIGNED
OS: Windows 7 → All
Whiteboard: [fixed-in-fx-team]
Target Milestone: Firefox 12 → Firefox 13
https://hg.mozilla.org/mozilla-central/rev/097b38220aa7
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Mozilla/5.0 (X11; Linux x86_64; rv:13.0a1) Gecko/13.0a1 Firefox/13.0a1
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/13.0 Firefox/13.0a1
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/13.0 Firefox/13.0a1

Verified with steps from comment 0 on Firefox 13, today's Nightly. URLs are now loaded when dragged into about:newtab.
Status: RESOLVED → VERIFIED
Whiteboard: [qa!]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: