From abd05f51055e1df27203a59c1e4f2cac97fa641a Mon Sep 17 00:00:00 2001 From: n1474335 Date: Fri, 7 Apr 2017 21:50:53 +0100 Subject: [PATCH] Fixed popover bug in search and removed popovers when favourites are dragged out. --- src/web/OperationsWaiter.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/web/OperationsWaiter.js b/src/web/OperationsWaiter.js index 997c4ff8..93f6e6af 100755 --- a/src/web/OperationsWaiter.js +++ b/src/web/OperationsWaiter.js @@ -73,7 +73,9 @@ OperationsWaiter.prototype.searchOperations = function(e) { str = el.value; while (searchResultsEl.firstChild) { - $(searchResultsEl.firstChild).popover("destroy"); + try { + $(searchResultsEl.firstChild).popover("destroy"); + } catch (err) {} searchResultsEl.removeChild(searchResultsEl.firstChild); } @@ -209,7 +211,10 @@ OperationsWaiter.prototype.editFavouritesClick = function(e) { } }, onEnd: function(evt) { - if (this.removeIntent) evt.item.remove(); + if (this.removeIntent) { + $(evt.item).popover("destroy"); + evt.item.remove(); + } }.bind(this), });