Permalink
Browse files

Fix for bug 9646

  • Loading branch information...
1 parent f380034 commit f62c4ca4de85d163b41349c3ab34a12516abd226 anthonyforth committed Apr 30, 2007
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/editor/htmlarea/htmlarea.php
@@ -639,7 +639,13 @@ function createButton(txt) {
this._htmlArea = htmlarea;
// insert the editor before the textarea.
- textarea.parentNode.insertBefore(htmlarea, textarea);
+ //Bug fix - unless the textarea is nested within its label, in which case insert editor before label.
+ if (textarea.parentNode.nodeName.toLowerCase()=='label') {
+ textarea.parentNode.parentNode.insertBefore(htmlarea,textarea.parentNode);
+ }
+ else {
+ textarea.parentNode.insertBefore(htmlarea, textarea);
+ }
if (textarea.form) {
// we have a form, on submit get the HTMLArea content and

0 comments on commit f62c4ca

Please sign in to comment.