includes/clientside/tinymce/themes/advanced/js/anchor.js
changeset 543 dffcbfbc4e59
parent 395 fa4c5ecb7c9a
--- a/includes/clientside/tinymce/themes/advanced/js/anchor.js	Mon May 05 20:06:37 2008 -0400
+++ b/includes/clientside/tinymce/themes/advanced/js/anchor.js	Mon May 05 20:08:44 2008 -0400
@@ -8,8 +8,10 @@
 		elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG');
 		v = ed.dom.getAttrib(elm, 'name');
 
-		if (v)
+		if (v) {
+			this.action = 'update';
 			f.anchorName.value = v;
+		}
 
 		f.insert.value = ed.getLang(elm ? 'update' : 'insert');
 	},
@@ -18,7 +20,9 @@
 		var ed = this.editor;
 		
 		tinyMCEPopup.restoreSelection();
-		ed.selection.collapse(1);
+
+		if (this.action != 'update')
+			ed.selection.collapse(1);
 
 		// Webkit acts weird if empty inline element is inserted so we need to use a image instead
 		if (tinymce.isWebKit)