Skip to content

Commit

Permalink
UPDATE: Improve <<numberbox>> behavior for decimals. See #79 .
Browse files Browse the repository at this point in the history
Not nearly a complete solution for decimals, but at least this keeps Firefox, and possibly others, from flagging decimal numbers as invalid.
  • Loading branch information
tmedwards committed Nov 8, 2020
1 parent c896acc commit f24651f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/macros/macrolib.js
Original file line number Diff line number Diff line change
Expand Up @@ -1680,6 +1680,11 @@
}))
.appendTo(this.output);

// Set the step value for `<input type="number">`.
if (asNumber) {
el.step = 'any';
}

// Set the variable and input element to the default value.
State.setVar(varName, defaultValue);
el.value = defaultValue;
Expand Down

0 comments on commit f24651f

Please sign in to comment.