diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js index 370e3c06ba..f1ec2d1893 100644 --- a/phpBB/adm/style/editor.js +++ b/phpBB/adm/style/editor.js @@ -176,13 +176,10 @@ function insert_text(text, spaces, popup) /** * Add inline attachment at position */ -function attach_inline(index, filename, element) +function attach_inline(index, filename) { insert_text('[attachment=' + index + ']' + filename + '[/attachment]'); - if (element) - { - element.focus(); - } + document.forms[form_name].elements[text_name].focus(); } /** diff --git a/phpBB/styles/subSilver/template/editor.js b/phpBB/styles/subSilver/template/editor.js index 370e3c06ba..f1ec2d1893 100644 --- a/phpBB/styles/subSilver/template/editor.js +++ b/phpBB/styles/subSilver/template/editor.js @@ -176,13 +176,10 @@ function insert_text(text, spaces, popup) /** * Add inline attachment at position */ -function attach_inline(index, filename, element) +function attach_inline(index, filename) { insert_text('[attachment=' + index + ']' + filename + '[/attachment]'); - if (element) - { - element.focus(); - } + document.forms[form_name].elements[text_name].focus(); } /** diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html index 525639b3c5..1f523d012a 100644 --- a/phpBB/styles/subSilver/template/posting_body.html +++ b/phpBB/styles/subSilver/template/posting_body.html @@ -307,7 +307,7 @@ function checkForm()