浏览代码

Option selects now default to the first option if not previously set

n1474335 8 年之前
父节点
当前提交
57dcd961d5
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/web/OptionsWaiter.js

+ 2 - 0
src/web/OptionsWaiter.js

@@ -47,6 +47,8 @@ OptionsWaiter.prototype.load = function(options) {
         if (val) {
             selects[i].value = val;
             selects[i].dispatchEvent(new CustomEvent("change", {bubbles: true}));
+        } else {
+            selects[i].selectedIndex = 0;
         }
     }
 };