a-n-d-r-3-w / calculator

An arithmetic calculator implemented using JavaScript, HTML, LESS, Dojo Toolkit, and QUnit
http://a-n-d-r-3-w.github.io/calculator/
0 stars 0 forks source link

After an answer is displayed, if the user enters a number, it modifies the answer instead of starting a new expression #12

Closed a-n-d-r-3-w closed 10 years ago

a-n-d-r-3-w commented 10 years ago

Repro steps:

Press: 1+2=000

See that the zeros get appended to "3".

Proposed fix: When an answer is displayed, if the user enters an operator, then add a chained operation. If the user enters a number, then start a new expression.

a-n-d-r-3-w commented 10 years ago

Solution: If the display is showing the result and the user enters a digit, then clear the display model and view.