microsoft / calculator

Windows Calculator: A simple yet powerful calculator that ships with Windows
MIT License
29.76k stars 5.39k forks source link

Unable to set focus back to the Calculator after minimizing using the title bar menu #1325

Open ghost opened 4 years ago

ghost commented 4 years ago

Describe the Bug: Sometimes we are unable to set focus back to the Calculator after minimizing using the title bar menu. This issue occurs when we are working in the Graphing mode. After opening the app again, we cannot press even a single button.

Steps to Reproduce: This bug is intermittent. You may have a hard time reproducing this bug; I resetted this app several times in order to record a handful of occurences. If someone is able to reproduce this, please leave a comment telling your observations so that the maintainers find it easier to debug.

  1. Open the Calculator in Graphing mode.
  2. In the expression box, type an incomplete expression as shown below:
    x<

    OR

    x=

    OR

    x/

    OR

    x|
  3. Right-click the title bar and select 'Minimize'.

Title Bar

  1. Restore the app from the taskbar.
  2. You will notice that you are unable to click any button or text field.

Focus Bug

Expected Behaviour: We should have been able to set focus to any button or text field.

Device and Application Info: OS Build: 10.0.19041.264 Architecture: x64 Application Version: 10.2005.23.0 Region: India (en-US) Dev-Version Installed: No

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

MicrosoftIssueBot commented 4 years ago

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

ghost commented 4 years ago

The most reliable way to reproduce this is using:

x/
grochocki commented 4 years ago

@Rahul-Dixit I am not able to reproduce this issue. You mention it is intermittent -- is it common (e.g., 1 in 3) or rare (e.g., 1 in 20)?

ghost commented 4 years ago

@grochocki This is indeed rare. It occurs randomly and does not have any definite pattern of occurrence. I have been able to reproduce this bug on two systems. I will share a GIF showing this issue in some time.

ghost commented 4 years ago

@grochocki Here is the GIF showing the issue:

 Freeze

Note:

  1. The bug seems easier to reproduce when the Calculator window is not in maximized mode. However it is possible to reproduce this issue in maximized mode.
  2. If the calculator no longer shows the incomplete expression x/ in red after you restore the window, you have successfully reproduced this bug.
  3. In the later half of this GIF, I am clicking various areas of the screen. See that I am getting no response. The calculator is unable to set focus to those buttons when they are clicked.
  4. If you maximize the window after the calculator has freezed, VisualStates no longer work.
  5. I have reproduced this issue alike on two systems having very different configurations. So, in my view, it is not machine-dependent.

You may not be able to reproduce this in your first attempt. Please close the window and try again!

It may also be helpful to reset this app before trying to reproduce this issue.

grochocki commented 4 years ago

I was still not able to reproduce this issue, but your GIF clearly shows the issue you describe, so approving.

For me, it always processes the first equation as an error and shows the second entry point:

Pa56eepr6k

ghost commented 4 years ago

@grochocki Yes, this happens in my case also. But in a few instances, this issue occurs.

I want to give you a measure of its rarity. So I am trying to reproduce this issue afresh. For this I am resetting Windows Calculator.

First try: The expression is highlighted in red, which means I failed. So I am closing the Calculator window and then opening it again for the second try.

Second Try: Failed. Repeating the above steps.

Third try: Failed

Fourth try: Successfully reproduced the issue this time. The expression isn't highlighted in red and I'm unable to set focus to anything.

You may also succeed in a couple of tries. In fact, I discovered this issue when I minimized the Graphing calculator to change the music track.