Bug 92737 - Part 6: Open multiple tabs when multiple items are dropped on New Tab button

Issue #121
This commit is contained in:
janekptacijarabaci 2018-04-15 11:47:06 +02:00 committed by Roy Tam
commit e2409ebbc1

View file

@ -2769,11 +2769,14 @@ var newTabButtonObserver = {
onDrop: function (aEvent)
{
let url = browserDragAndDrop.drop(aEvent, { });
getShortcutOrURIAndPostData(url).then(data => {
if (data.url) {
// allow third-party services to fixup this URL
openNewTabWith(data.url, null, data.postData, aEvent, true);
let links = browserDragAndDrop.dropLinks(aEvent);
Task.spawn(function*() {
for (let link of links) {
let data = yield getShortcutOrURIAndPostData(link.url);
if (data.url) {
// allow third-party services to fixup this URL
openNewTabWith(data.url, null, data.postData, aEvent, true);
}
}
});
}