Mercurial > public > sg101
diff media/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js @ 247:6ed2932901fa
Update tinymce to 3.3.9
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 18 Sep 2010 19:54:11 +0000 |
parents | 237710206167 |
children |
line wrap: on
line diff
--- a/media/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js Sat Sep 18 19:39:16 2010 +0000 +++ b/media/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js Sat Sep 18 19:54:11 2010 +0000 @@ -261,7 +261,9 @@ }, _showMenu : function(ed, e) { - var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()); + var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target; + + e = 0; // Fixes IE memory leak if (!m) { p1 = DOM.getPos(ed.getContentAreaContainer()); @@ -276,11 +278,11 @@ t._menu = m; } - if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) { + if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) { m.removeAll(); m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); - t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) { + t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) { var ignoreRpc; m.removeAll(); @@ -289,7 +291,7 @@ m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); each(r, function(v) { m.add({title : v, onclick : function() { - dom.replace(ed.getDoc().createTextNode(v), e.target); + dom.replace(ed.getDoc().createTextNode(v), wordSpan); t._checkDone(); }}); }); @@ -302,9 +304,9 @@ m.add({ title : 'spellchecker.ignore_word', onclick : function() { - var word = e.target.innerHTML; + var word = wordSpan.innerHTML; - dom.remove(e.target, 1); + dom.remove(wordSpan, 1); t._checkDone(); // tell the server if we need to @@ -320,7 +322,7 @@ m.add({ title : 'spellchecker.ignore_words', onclick : function() { - var word = e.target.innerHTML; + var word = wordSpan.innerHTML; t._removeWords(dom.decode(word)); t._checkDone(); @@ -340,9 +342,9 @@ m.add({ title : 'spellchecker.learn_word', onclick : function() { - var word = e.target.innerHTML; + var word = wordSpan.innerHTML; - dom.remove(e.target, 1); + dom.remove(wordSpan, 1); t._checkDone(); ed.setProgressState(1); @@ -356,9 +358,9 @@ m.update(); }); - ed.selection.select(e.target); - p1 = dom.getPos(e.target); - m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y); + ed.selection.select(wordSpan); + p1 = dom.getPos(wordSpan); + m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y); return tinymce.dom.Event.cancel(e); } else