includes/clientside/tinymce/themes/advanced/js/image.js
changeset 543 dffcbfbc4e59
parent 459 31c23016ab62
--- a/includes/clientside/tinymce/themes/advanced/js/image.js	Mon May 05 20:06:37 2008 -0400
+++ b/includes/clientside/tinymce/themes/advanced/js/image.js	Mon May 05 20:08:44 2008 -0400
@@ -54,6 +54,8 @@
 	update : function() {
 		var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
 
+		tinyMCEPopup.restoreSelection();
+
 		if (f.src.value === '') {
 			if (ed.selection.getNode().nodeName == 'IMG') {
 				ed.dom.remove(ed.selection.getNode());
@@ -86,7 +88,7 @@
 		if (el && el.nodeName == 'IMG') {
 			ed.dom.setAttribs(el, args);
 		} else {
-			ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" src="javascript:;" />', {skip_undo : 1});
+			ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1});
 			ed.dom.setAttribs('__mce_tmp', args);
 			ed.dom.setAttrib('__mce_tmp', 'id', '');
 			ed.undoManager.add();