diff --git a/puckweb/Areas/puck/Views/Shared/EditorTemplates/ContentPicker.cshtml b/puckweb/Areas/puck/Views/Shared/EditorTemplates/ContentPicker.cshtml index fdbb2fe0..b5fb3f04 100644 --- a/puckweb/Areas/puck/Views/Shared/EditorTemplates/ContentPicker.cshtml +++ b/puckweb/Areas/puck/Views/Shared/EditorTemplates/ContentPicker.cshtml @@ -198,6 +198,8 @@ } container.find(".addItem").unbind().click(function (e) { + if(overlayEl) + overlayEl.remove(); if (selected_container.find(".selected_node").length >= maxPick) { msg(undefined, "you cannot select any more, max selection is set to " + maxPick, undefined, undefined); return false; diff --git a/puckweb/Areas/puck/Views/Shared/EditorTemplates/ImagePicker.cshtml b/puckweb/Areas/puck/Views/Shared/EditorTemplates/ImagePicker.cshtml index 94c63277..0708eecb 100644 --- a/puckweb/Areas/puck/Views/Shared/EditorTemplates/ImagePicker.cshtml +++ b/puckweb/Areas/puck/Views/Shared/EditorTemplates/ImagePicker.cshtml @@ -180,6 +180,8 @@ loadData(); var overlayEl = null; container.find(".addImage").unbind().click(function (e) { + if(overlayEl) + overlayEl.remove(); if (selected_container.find(".item").length >= maxPick) { msg(undefined, "you cannot select any more, max selection is set to " + maxPick, undefined, undefined); return false;