Commit c27a1236 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Only call mceFocus on the first editor in a form


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 9f6630df
......@@ -101,11 +101,10 @@ function pieform_element_wysiwyg_get_headdata() {
. "\nPieformManager.connect('onload', null, function() {\n";
foreach ($_PIEFORM_WYSIWYGS as $editor) {
$result .= " tinyMCE.execCommand('mceAddControl', false, '$editor');\n";
$result .= " tinyMCE.execCommand('mceFocus', false, '$editor');\n";
}
$result .= " tinyMCE.execCommand('mceFocus', false, '$_PIEFORM_WYSIWYGS[0]');\n";
$result .= "});\nPieformManager.connect('onreply', null, function() {\n";
foreach ($_PIEFORM_WYSIWYGS as $editor) {
$result .= " tinyMCE.execCommand('mceFocus', false, '$editor');\n";
$result .= " tinyMCE.execCommand('mceRemoveControl', false, '$editor');\n";
}
$result .= "});</script>";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment