diff --git a/src/js/entry.js b/src/js/entry.js index 246d286..9685915 100644 --- a/src/js/entry.js +++ b/src/js/entry.js @@ -149,8 +149,10 @@ DEFINE_CLASS("DlEntry", DlContainer, function(D, P, DOM) { }; function element_change() { - this.__setEmpty(); - this.callHooks("onChange"); + if (!this.destroyed) { + this.__setEmpty(); + this.callHooks("onChange"); + } }; P.__setEmpty = function(value) { diff --git a/src/js/eventproxy.js b/src/js/eventproxy.js index e3b2bea..99fba4a 100644 --- a/src/js/eventproxy.js +++ b/src/js/eventproxy.js @@ -79,6 +79,7 @@ DEFINE_CLASS("DlEventProxy", null, function(D, P) { if (!this.__eventHooks) throw new DlExStopEventBubbling; var a = this.__eventHooks[ev.toLowerCase()]; + if (!a) return []; // if (!a) // throw new DlException("Event [" + ev + "] not registered."); if (copy) diff --git a/src/js/jslib.js b/src/js/jslib.js index 1ee3e93..12655cd 100644 --- a/src/js/jslib.js +++ b/src/js/jslib.js @@ -2081,17 +2081,10 @@ window.DynarchDomUtils = { }, strip : function(el) { - try { - var r = el.ownerDocument.createRange(); - r.selectNodeContents(el); - p.insertBefore(el, r.extractContents()); - r.detach(); - } catch(ex) { - var p = el.parentNode; - while (el.firstChild) - p.insertBefore(el.firstChild, el); - } - this.trash(el); + var p = el.parentNode; + while (el.firstChild) + p.insertBefore(el.firstChild, el); + DynarchDomUtils.trash(el); }, createFromHtml : function(html) {