I’ve got a sort of a display bug in my JS Calculator: http://codepen.io/AbdiViklas/pen/GjdrZQ?editors=0010 .
When entering a decimal following another numeral, I’m using
$("#display").append(".");. The result is a big space before the dot, as if the dot character is monospaced like other characters and taking up just as much room. But when a decimal result is returned from an equation, or when starting an entry with “0.”…, which uses the line
$("#display").text("0."); (as part of an if statement so that, if entering a decimal immediately after an operator, a new entry is started instead of appending to the existing value), the decimal renders as I would prefer, nice and compact against the preceding digit.
It would seem this doesn’t have to do with the font (as a “x.x” string renders correctly). Is it a CSS issue? JS/jQuery? (