Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mishoo committed Mar 25, 2012
1 parent 005f06a commit 7bb45a1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
6 changes: 4 additions & 2 deletions src/js/entry.js
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/js/eventproxy.js
Expand Up @@ -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)
Expand Down
15 changes: 4 additions & 11 deletions src/js/jslib.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 7bb45a1

Please sign in to comment.