Committer: vkurkin
LJSUP-9871: Need disable auto added at the end of textU trunk/htdocs/js/ck/plugins/livejournal/plugin.js
Modified: trunk/htdocs/js/ck/plugins/livejournal/plugin.js =================================================================== --- trunk/htdocs/js/ck/plugins/livejournal/plugin.js 2011-09-22 06:58:03 UTC (rev 20108) +++ trunk/htdocs/js/ck/plugins/livejournal/plugin.js 2011-09-22 07:28:01 UTC (rev 20109) @@ -361,7 +361,11 @@ var body = editor.document.getBody(); var last = body.$.lastChild; if (!last || last.nodeType != 1 || last.nodeName.toLowerCase() != 'br') { + // IE fix: LJSUP-9871; + var selection = editor.document.getSelection(); + var bookmark = selection && selection.createBookmarks(); body.appendHtml('<br />'); + selection && selection.selectBookmarks(bookmark); } } @@ -394,7 +398,7 @@ checkLastLine(); editor.document.on('mouseout', note.hide); editor.document.on('mouseover', findLJTags); - editor.document.on('keyup', checkLastLine); + editor.document.on('keydown', checkLastLine); editor.document.on('click', checkLastLine); editor.document.on('selectionChange', checkLastLine); editor.document.on('afterCommandExec', checkLastLine);