]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/utils/form_utils.js
Wordpress 2.9
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / utils / form_utils.js
index 1d56306984d58c23a1c7f3ef2f73f9911f6938fe..f6cd96a0245deadc02789594bed613dd14e144d0 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * $Id: form_utils.js 996 2009-02-06 17:32:20Z spocke $
+ * $Id: form_utils.js 1184 2009-08-11 11:47:27Z spocke $
  *
  * Various form utilitiy functions.
  *
@@ -92,7 +92,7 @@ function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
 function getSelectValue(form_obj, field_name) {
        var elm = form_obj.elements[field_name];
 
-       if (elm == null || elm.options == null)
+       if (elm == null || elm.options == null || elm.selectedIndex === -1)
                return "";
 
        return elm.options[elm.selectedIndex].value;