Calculator: Users are unable to edit numerical values inserted from memory

Created on 19 Jul 2019  路  6Comments  路  Source: microsoft/calculator

Describe the bug
Users are unable to edit numerical values inserted from memory.

Steps To Reproduce

  1. Perform a calculation in Standard or Scientific mode so that a result is generated
  2. Press "MS" button to store memory entry
  3. Press ESC to clear input
  4. Press "MR" button to recall stored memory entry
  5. Press Backspace and notice that you cannot edit the numerical value

Note: This is only kind of related to #519, but in this case, we are only ever restoring numerical values, and not operators.

Expected behavior
Numerical values are editable as if you typed them in manually.

Screenshots
N/A

Device and Application Information

  • OS Build: 10.0.18942.0
  • Architecture: X64
  • Application Version: 10.1906.25.0
  • Region: en-US
  • Dev Version Installed: True

Requested Assignment
I'm just reporting this problem. I don't want to fix it.

User Experience Bug 3 help wanted triage approved

All 6 comments

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

I have a question. After restoring from history, what should happen to the expression when someone types in some value or an operator?

image

Great question, @praveensvsrk! After reviewing this bug again, I think it might be a good idea to tease apart memory from history.

I think memory is much more straightforward, and this bug does a great job at capturing the intended behavior. That is, when you insert a value from memory, it should be treated the same as if you inputted a number via keyboard or copy-and-paste, and you should be able to edit the value.

With history, since the entire expression is brought in, you are really inserting the expression + the result of evaluating that expression. It is not as clear as with memory that you should be able to edit that result. #163 is intended to capture some of the nuance there.

I renamed the issue to more accurately capture this.

Thanks for the clarification! :)
I would like to work on this issue!

Awesome, thanks for taking a look!

Sorry for the delay, I got occupied with personal work.

I checked the code flow, we are setting m_bRecord property of CCalcEngine to false when the OpCode is between IDC_FE and IDC_MINUS. IDC_RECALL (Which is the opcode for MR button) falls in this range, hence editing is disabled. Not sure why this was done in the first place, maybe someone here can throw some light on this.

I will submit a fix after some testing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patrick-compass picture patrick-compass  路  22Comments

TristanYoung picture TristanYoung  路  28Comments

janisozaur picture janisozaur  路  15Comments

ThiefMaster picture ThiefMaster  路  30Comments

MicrosoftIssueBot picture MicrosoftIssueBot  路  16Comments