mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Bug 92737 - Part 10: Use browserDragAndDrop.dropLinks in urlbarBindings.xml
Issue #121
This commit is contained in:
parent
04c959e619
commit
9a8a5cb244
1 changed files with 3 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue