summaryrefslogtreecommitdiff
path: root/application
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-15 11:47:06 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-15 11:47:06 +0200
commitf8d2aaee8068c98ccc882a4808bca22656da08f0 (patch)
tree4f74ca7ce19e5b2253a5f944d243e34ea44aa54b /application
parent5e4b138e1491d18d8d2738c3864089042767cc20 (diff)
downloaduxp-f8d2aaee8068c98ccc882a4808bca22656da08f0.tar.gz
Bug 92737 - Part 6: Open multiple tabs when multiple items are dropped on New Tab button
Issue mcp-graveyard/UXP#121
Diffstat (limited to 'application')
-rw-r--r--application/palemoon/base/content/browser.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index efd26c2b92..9c8e169423 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -2770,11 +2770,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);
+ }
}
});
}