1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-26 13:04:13 +02:00

Merge remote-tracking branch 'prototech/ticket/12135' into develop

This commit is contained in:
Joas Schilling
2014-02-02 13:39:44 +01:00

View File

@ -78,14 +78,13 @@ function bbfontstyle(bbopen, bbclose) {
if (theSelection) { if (theSelection) {
// Add tags around selection // Add tags around selection
document.selection.createRange().text = bbopen + theSelection + bbclose; document.selection.createRange().text = bbopen + theSelection + bbclose;
document.forms[form_name].elements[text_name].focus(); textarea.focus();
theSelection = ''; theSelection = '';
return; return;
} }
} else if (document.forms[form_name].elements[text_name].selectionEnd } else if (textarea.selectionEnd && (textarea.selectionEnd - textarea.selectionStart > 0)) {
&& (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0)) { mozWrap(textarea, bbopen, bbclose);
mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose); textarea.focus();
document.forms[form_name].elements[text_name].focus();
theSelection = ''; theSelection = '';
return; return;
} }