1
0
mirror of synced 2024-11-16 19:17:13 +01:00

Merge branch 'popover-patch' of https://github.com/Ge0rg3/CyberChef into Ge0rg3-popover-patch

This commit is contained in:
n1474335 2019-06-27 15:31:57 +01:00
commit cde3eb2c39

View File

@ -124,16 +124,21 @@ class RecipeWaiter {
* @param {event} evt
*/
opSortEnd(evt) {
if (this.removeIntent) {
if (evt.item.parentNode.id === "rec-list") {
evt.item.remove();
}
if (this.removeIntent && evt.item.parentNode.id === "rec-list") {
evt.item.remove();
return;
}
// Reinitialise the popover on the original element in the ops list because for some reason it
// gets destroyed and recreated.
this.manager.ops.enableOpsListPopovers(evt.clone);
// gets destroyed and recreated. If the clone isn't in the ops list, we use the original item instead.
let enableOpsElement;
if (evt.clone.parentNode && evt.clone.parentNode.classList.contains("op-list")) {
enableOpsElement = evt.clone;
} else {
enableOpsElement = evt.item;
$(evt.item).attr("data-toggle", "popover");
}
this.manager.ops.enableOpsListPopovers(enableOpsElement);
if (evt.item.parentNode.id !== "rec-list") {
return;