Last Comment Bug 721417 - Can't drag and drop URL into about:newtab
: Can't drag and drop URL into about:newtab
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: Trunk
: All All
-- normal with 1 vote (vote)
: Firefox 13
Assigned To: Tim Taubert [:ttaubert]
: 725791 (view as bug list)
Depends on:
Blocks: 455553 722672
  Show dependency treegraph
Reported: 2012-01-26 08:58 PST by James Socol [:jsocol, :james]
Modified: 2013-11-12 00:56 PST (History)
9 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch v1 (1.63 KB, patch)
2012-02-04 07:04 PST, Tim Taubert [:ttaubert]
fryn: review+
Details | Diff | Splinter Review

Description User image James Socol [:jsocol, :james] 2012-01-26 08:58:55 PST
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.

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)

URL loads in tab

Nothing happens

Using the latest Nightly builds on Windows 7 (checked both the 32- and 64-bit builds).
Comment 1 User image Daniel Holbert [:dholbert] 2012-02-03 15:37:45 PST
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 ).
(that is to say, the dropped file gets loaded)
Comment 2 User image Daniel Holbert [:dholbert] 2012-02-03 15:50:06 PST
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.)
Comment 3 User image Tim Taubert [:ttaubert] 2012-02-04 07:04:28 PST
Created attachment 594443 [details] [diff] [review]
patch v1

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.
Comment 4 User image Tim Taubert [:ttaubert] 2012-02-04 07:08:58 PST
Forgot to mention that (2) is the actual culprit because why we currently don't accept drops properly.
Comment 5 User image Frank Yan (:fryn) 2012-02-06 04:17:33 PST
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
Comment 6 User image Tim Taubert [:ttaubert] 2012-02-07 18:04:49 PST
Comment 7 User image Tim Taubert [:ttaubert] 2012-02-09 00:31:37 PST
Comment 8 User image Alice0775 White 2012-02-09 13:11:55 PST
*** Bug 725791 has been marked as a duplicate of this bug. ***
Comment 9 User image Virgil Dicu [:virgil] [QA] 2012-02-21 04:36:12 PST
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.

Note You need to log in before you can comment on or make changes to this bug.