Skip to content

Fix input behavior for parity with normal calculators - #107

Merged
Bnyro merged 1 commit into
you-apps:mainfrom
Falson127:fix_input_behavior
Sep 23, 2026
Merged

Bnyro merged 1 commit into
you-apps:mainfrom
Falson127:fix_input_behavior

Conversation

@Falson127

Copy link
Copy Markdown
Contributor

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.

@Bnyro
Bnyro force-pushed the fix_input_behavior branch from 2b874c8 to af3fa42 Compare September 23, 2026 09:33

@Bnyro Bnyro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Bnyro
Bnyro merged commit 09ea4ed into you-apps:main Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants