diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-15 11:53:33 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-15 11:53:33 +0200 |
commit | 94730c6508e83e6209139f768a7a3e27bcd1e358 (patch) | |
tree | a1321286a154942e6d4ef5b12ccd9193f1a866ad /application | |
parent | a26557d9bd7eabf944ced633ece3cb4545651584 (diff) | |
download | uxp-94730c6508e83e6209139f768a7a3e27bcd1e358.tar.gz |
Bug 92737 - Part 10: Use browserDragAndDrop.dropLinks in urlbarBindings.xml
Issue mcp-graveyard/UXP#121
Diffstat (limited to 'application')
-rw-r--r-- | application/palemoon/base/content/urlbarBindings.xml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/application/palemoon/base/content/urlbarBindings.xml b/application/palemoon/base/content/urlbarBindings.xml index e859fe8040..bdb7a6a122 100644 --- a/application/palemoon/base/content/urlbarBindings.xml +++ b/application/palemoon/base/content/urlbarBindings.xml @@ -455,11 +455,12 @@ <method name="onDrop"> <parameter name="aEvent"/> <body><![CDATA[ - let url = browserDragAndDrop.drop(aEvent, { }) + let links = browserDragAndDrop.dropLinks(aEvent); // The URL bar automatically handles inputs with newline characters, // so we can get away with treating text/x-moz-url flavours as text/plain. - if (url) { + if (links.length > 0 && links[0].url) { + let url = links[0].url; aEvent.preventDefault(); this.value = url; SetPageProxyState("invalid"); |