Repository navigation
Fix input behavior for parity with normal calculators - #107
Merged
Merged
Conversation
Bnyro
force-pushed
the
fix_input_behavior
branch
from
September 23, 2026 09:33
2b874c8 to
af3fa42
Compare
Bnyro
approved these changes
Sep 23, 2026
Bnyro
left a comment
Member
There was a problem hiding this comment.
Awesome, thank you!
I'm not sure if this behavior also applies to the decimal point, i.e. you usually don't start your calculation by typing ,. But I don't have a strong opinion, so we'll keep your behavior as long as nobody complains.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On most calculators once you evaluate an expression, you either press an operator key to continue working with the previous answer, or you start a new expression by beginning to type a new number. This was not the case before for this app.
Previous behavior: After pressing evaluate key, going to type a new expression would simply append the new digit or decimal to the previous answer.
New behavior: When the user signals that a new expression is desired by typing a digit (or a decimal to start a fractional number) the text field value is replaced with the new input, rather than appending it to the previous answer. Pressing an operator key or trigonometric key retains the old functionality, as the user presumably wants to perform some operation on the answer.