Commits

Anonymous committed 657cf4f

Make submitter filter AJAX work in Firefox

.options can't be set in Firefox.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

  • Participants
  • Parent commits edb4b3a

Comments (0)

Files changed (1)

File templates/patchwork/filters.html

         return;
     }
 
-    submitter_select.options = [];
-
     for (i = 0; i < completions.length; i++) {
         name = completions[i]['fields']['name'];
         if (name) {
         o = new Option(name, completions[i]['pk']);
         submitter_select.options[i] = o;
     }
+
+    /* remove remaining options */
+    for (; i < submitter_select.length; i++) {
+        submitter_select.options[i] = null;
+    }
+
     submitter_select.disabled = false;
     req = null;
 }