Permalink
Browse files

small fixes

  • Loading branch information...
1 parent 005f06a commit 7bb45a193716872aacc737dd91cc1f4760588bbd @mishoo committed Mar 25, 2012
Showing with 9 additions and 13 deletions.
  1. +4 −2 src/js/entry.js
  2. +1 −0 src/js/eventproxy.js
  3. +4 −11 src/js/jslib.js
View
@@ -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) {
View
@@ -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)
View
@@ -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) {

0 comments on commit 7bb45a1

Please sign in to comment.