Vlad Kurkin (b_vladi) wrote in changelog,
Vlad Kurkin
b_vladi
changelog

[livejournal] r20593: LJSUP-10445: Lj-cut eat my content (Oper...

Committer: vkurkin
LJSUP-10445: Lj-cut eat my content (Opera)
U   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-11-22 08:09:38 UTC (rev 20592)
+++ trunk/htdocs/js/ck/plugins/livejournal/plugin.js	2011-11-22 08:13:18 UTC (rev 20593)
@@ -684,6 +684,7 @@
 							}
 						}
 					} else {
+						selection.lock();
 						if (text = prompt(top.CKLang.CutPrompt, top.CKLang.ReadMore)) {
 							var selection = new CKEDITOR.dom.selection(editor.document),
 								ranges = selection.getRanges(),
@@ -705,7 +706,6 @@
 							iframeClose.setAttribute('frameBorder', 0);
 							iframeClose.setAttribute('allowTransparency', 'true');
 
-							selection.lock();
 							if (ranges[0].collapsed === true) {
 								editor.insertElement(iframeClose);
 								iframeClose.insertBeforeMe(iframeOpen);
@@ -720,8 +720,8 @@
 								editor.insertElement(iframeClose);
 								iframeClose.insertBeforeMe(fragment);
 							}
-							selection.unlock();
 						}
+						selection.unlock();
 
 						CKEDITOR.note && CKEDITOR.note.hide(true);
 					}

Tags: b_vladi, js, livejournal, vkurkin
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments