Bug 1355073 - Accidentally starting a drag on the identity block reloads the page and discards pending permission prompts. r=johannh

Changed the function to check if the dropped and current URL are not same.

Differential Revision: https://phabricator.services.mozilla.com/D24509

--HG--
extra : moz-landing-system : lando
This commit is contained in:
phoenixabhishek 2019-03-25 21:32:52 +00:00
Родитель e4592b471b
Коммит 29c63e27f1
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -1054,9 +1054,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
<parameter name="aEvent"/>
<body><![CDATA[
let droppedItem = this._getDroppableItem(aEvent);
if (droppedItem) {
let droppedURL = droppedItem instanceof URL ? droppedItem.href : droppedItem;
if (droppedURL && (droppedURL !== gBrowser.currentURI.spec)) {
let triggeringPrincipal = browserDragAndDrop.getTriggeringPrincipal(aEvent);
this.value = droppedItem instanceof URL ? droppedItem.href : droppedItem;
this.value = droppedURL;
SetPageProxyState("invalid");
this.focus();
this.handleCommand(null, undefined, undefined, triggeringPrincipal);