From 294ee5d949bd2d8e3e97006e8b2ce3d8e2b95d75 Mon Sep 17 00:00:00 2001 From: Brian Link Date: Thu, 7 Aug 2014 12:21:45 -0700 Subject: [PATCH] Fixes destruction of placeholder Fixes a TypeError when trying to remove non-activated placeholder. Also removes a property added to the main element when the placeholder is created (so that it can be properly re-created on the same element). --- medium.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/medium.js b/medium.js index 5d51316..cee36ee 100644 --- a/medium.js +++ b/medium.js @@ -594,9 +594,10 @@ var Medium = (function (w, d) { settings = this.settings, placeholder = this.placeholder || null; - if (placeholder !== null) { + if (placeholder !== null && placeholder.setup) { //remove placeholder placeholder.parentNode.removeChild(placeholder); + delete el.placeHolderActive; } //remove contenteditable