Skip to content

Commit

Permalink
Update core js to trigger content change to "" on any removed element…
Browse files Browse the repository at this point in the history
…, right before removal
  • Loading branch information
ddstreet committed Oct 22, 2013
1 parent 38bd57d commit 29f8ff8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion html/javascript/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,13 @@ _crgScoreBoard = {

removeScoreBoardElement: function(parent, e) {
if (!e) return;
e.children(function() { removeScoreBoardElement(e, $sb(this)); });
e.children().each(function() {
_crgScoreBoard.removeScoreBoardElement(e, $sb(this));
});
var oldContent = e.$sbGet();
_crgScoreBoard.setXmlElementText(e, "");
_crgScoreBoard.setHtmlValue(e, "");
e.trigger("sbchange", [ "", oldContent ]);
delete _crgScoreBoard.addEventTriggered[e.$sbPath];
parent.trigger("sbremove", [ e ]);
parent.trigger("sbremove:"+e.$sbName, [ e ]);
Expand Down

0 comments on commit 29f8ff8

Please sign in to comment.