Calculator: Right-click on numbers fails to highlight after 'selecting all' from context menu

Created on 20 Aug 2019  ·  4Comments  ·  Source: microsoft/calculator

Describe the bug
When trying to "select all" when right-clicking on the main display output, you are not able to actually select all text.

Steps To Reproduce

  1. Enter in a number in Calculator
  2. Right-click on the number and click "select all"

Expected behavior
Display text appears selected.

Screenshots
Could not capture a good screenshot.

Device and Application Information

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

Additional context
Right-clicking again selects all text, so it appears this bug might only affect visuals.

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

User Experience 3 fixed hacktoberfest

All 4 comments

This is your friendly Microsoft Issue Bot. I created this issue automatically as requested by a team member.

Can I work on this?

Go for it, @praveensvsrk!

Right-clicking again selects all text, so it appears this bug might only affect visuals.

I selected only a part of the number, clicked somewhere else on the number pane (outside the number, so that focus is lost), then right clicked again on the number. Interestingly, the old selection persisted. So in your case, on right-clicking again, the number appeared as selected. Is this behavior (of persisting the previous selection) expected?

About the issue, looks like the cause here is the explicit _Focus_ call made to the outer/enclosing element during right-click

void CalculationResult::OnRightTapped(RightTappedRoutedEventArgs ^ e)
{
    this->Focus(::FocusState::Programmatic);
}

Subsequently after clicking _Select All_, the number does not get focused, hence does not appear highlighted. To test out my hypothesis, I commented out the line which sets the focus; Highlighting works as expected. I am checking this issue further.

Was this page helpful?
0 / 5 - 0 ratings