includes/clientside/tinymce/utils/editable_selects.js
changeset 335 67bd3121a12e
parent 1 fe660c52c48f
child 395 fa4c5ecb7c9a
--- a/includes/clientside/tinymce/utils/editable_selects.js	Wed Dec 26 00:37:26 2007 -0500
+++ b/includes/clientside/tinymce/utils/editable_selects.js	Thu Dec 27 22:09:33 2007 -0500
@@ -1,5 +1,5 @@
 /**
- * $Id: editable_selects.js 162 2007-01-03 16:16:52Z spocke $
+ * $Id: editable_selects.js 324 2007-11-01 12:58:49Z spocke $
  *
  * Makes select boxes editable.
  *
@@ -20,13 +20,13 @@
 				o.className = 'mceAddSelectValue';
 
 				nl[i].options[nl[i].options.length] = o;
-				nl[i].setAttribute('onchange', 'TinyMCE_EditableSelects.onChangeEditableSelect(this);');
+				nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
 			}
 		}
 	},
 
-	onChangeEditableSelect : function(se) {
-		var d = document, ne;
+	onChangeEditableSelect : function(e) {
+		var d = document, ne, se = window.event ? window.event.srcElement : e.target;
 
 		if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
 			ne = d.createElement("input");
@@ -34,7 +34,7 @@
 			ne.name = se.name + "_custom";
 			ne.type = "text";
 
-			ne.style.width = se.clientWidth;
+			ne.style.width = se.offsetWidth + 'px';
 			se.parentNode.insertBefore(ne, se);
 			se.style.display = 'none';
 			ne.focus();