rem: if(textarea_obj.focus) textarea_obj.focus(); 
add: if(textarea_obj.focus) { textarea_obj.focus(); } 
context: 	initialize_tags: function(textarea_obj, cmd) {		if (document.selection) {			if(textarea_obj.focus) textarea_obj.focus();			sel	= document.selection.createRange();			if (sel.text.length > 0) {				sel.text = this.replace_selection(this.tags[cmd][0], sel.text, this.tags[cmd][1]);			} else {				if (!this.tag_is_open(cmd) || this.tags[cmd][1] == '') {					sel.text = this.tags[cmd][0];					this.push_tag(cmd);				} else {					sel.text = this.tags[cmd][1];					this.pop_tag(cmd);				}			}			if(textarea_obj.focus) textarea_obj.focus();		} else if (textarea_obj.selectionStart || textarea_obj.selectionStart == '0') {			var startPos	= textarea_obj.selectionStart;			var endPos		= textarea_obj.selectionEnd;			var cursorPos	= endPos;			var scrollTop	= textarea_obj.scrollTop;			if (startPos != endPos) {				textarea_obj.value = textarea_obj.value.substring(0, startPos)							  + this.replace_selection(this.tags[cmd][0], textarea_obj.value.substring(startPos, endPos), this.tags[cmd][1])							  + textarea_obj.value.substring(endPos, textarea_obj.value.length);				cursorPos += this.tags[cmd][0].length + this.tags[cmd][1].length;			} else {				if (!this.tag_is_open(cmd) || this.tags[cmd][1] == '') {					textarea_obj.value = textarea_obj.value.substring(0, startPos)								  + this.tags[cmd][0]								  + textarea_obj.value.substring(endPos, textarea_obj.value.length);					this.push_tag(cmd);					cursorPos = startPos + this.tags[cmd][0].length;				} else {					textarea_obj.value = textarea_obj.value.substring(0, startPos)								  + this.tags[cmd][1]								  + textarea_obj.value.substring(endPos, textarea_obj.value.length);					this.pop_tag(cmd);					cursorPos = startPos + this.tags[cmd][1].length;				}			}			if(textarea_obj.focus) textarea_obj.focus();			textarea_obj.selectionStart = cursorPos;			textarea_obj.selectionEnd	= cursorPos;			textarea_obj.scrollTop		= scrollTop;		} else {			if (!this.tag_is_open(cmd) || this.tags[cmd][1] == '') {				textarea_obj.value += this.tags[cmd][0];				this.push_tag(cmd);			} else {				textarea_obj.value += this.tags[cmd][1];				this.pop_tag(cmd);			}			if(textarea_obj.focus) textarea_obj.focus();		}	}
meta: 8193	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8193/782215d5fb6697f8e778f8800b0a6eb59e168226/k4_editor.js/clean/trunk/upload/js/k4_editor.js