Index: bueditor.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/bueditor/bueditor.js,v
retrieving revision 1.20.2.12
diff -u -r1.20.2.12 bueditor.js
--- bueditor.js	9 Sep 2009 15:51:00 -0000	1.20.2.12
+++ bueditor.js	17 Sep 2009 21:36:12 -0000
@@ -49,8 +49,9 @@
 
 //integrate editor template into textarea T
 BUE.processTextarea = function (T, tplid) {
-  var T = typeof(T) == 'string' ? $('#'+ T).get(0) : T;
-  if (!BUE.templates[tplid] || !T || !T.tagName || T.tagName != 'TEXTAREA' || $(T).is(':hidden')) return false;
+  if (!T || !BUE.templates[tplid] || !(T = $(T).filter('textarea')[0])) return false;
+  //check visibility on the element-level only.
+  if (T.style.display == 'none' || T.style.visibility == 'hidden') return false;
   if (T.editor) return T.editor;
   var E = new BUE.instance(T, tplid);
   $(T).focus(function () {

