diff --git a/lib/client/edit.js b/lib/client/edit.js index b42801a7..2cf497f9 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -465,7 +465,9 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI var parent, HIDE_TIME = 2000; - if (!Msg) { + if (Msg) { + Msg.innerHTML = text; + } else { DOM.load.style({ id : 'msg-css', inner : '#js-view .msg {' + @@ -485,13 +487,16 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI Msg = DOM.load({ name : 'div', className : 'msg', - parent : parent + parent : parent, + inner : text }); } - Msg.innerHTML = text; DOM.show(Msg); - setTimeout(Util.exec.ret(DOM.hide, Msg), HIDE_TIME); + + setTimeout(function() { + DOM.hide(Msg); + }, HIDE_TIME); }; init();