зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1586796 - Make drag/drop nodes work with Fission. r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D48449 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
dff4b62791
Коммит
aff78a951a
|
@ -591,17 +591,13 @@ MarkupContainer.prototype = {
|
|||
if (this.isDragging) {
|
||||
this.cancelDragging();
|
||||
|
||||
const dropTargetNodes = this.markup.dropTargetNodes;
|
||||
|
||||
if (!dropTargetNodes) {
|
||||
if (!this.markup.dropTargetNodes) {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.markup.walker.insertBefore(
|
||||
this.node,
|
||||
dropTargetNodes.parent,
|
||||
dropTargetNodes.nextSibling
|
||||
);
|
||||
const { nextSibling, parent } = this.markup.dropTargetNodes;
|
||||
const { walkerFront } = parent;
|
||||
await walkerFront.insertBefore(this.node, parent, nextSibling);
|
||||
this.markup.emit("drop-completed");
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче