Skip to content

Make history and memory items clickable on their text - #2518

Open
Mohammad Umer (mohammad19169) wants to merge 1 commit into
microsoft:mainfrom
mohammad19169:fix/history-memory-item-click
Open

Mohammad Umer (mohammad19169) wants to merge 1 commit into
microsoft:mainfrom
mohammad19169:fix/history-memory-item-click

Conversation

@mohammad19169

@mohammad19169 Mohammad Umer (mohammad19169) commented Oct 20, 2026 •

Copy link
Copy Markdown

The expression/result TextBlocks in history items and the value TextBlock in memory items had IsTextSelectionEnabled set, so clicks on the text were consumed by text selection and never raised the ListView ItemClick. Only clicks on the surrounding whitespace loaded the item. Disable text selection so clicking anywhere on an item loads it; copying remains available via the context menu.

Description of the changes:

  • HistoryList.xaml: removed IsTextSelectionEnabled="True" from the expression (HistoryItemExpression) and result (HistoryItemValue) TextBlocks, so clicking the text of a history item loads it into the calculator.
  • MemoryListItem.xaml: removed IsTextSelectionEnabled="True" from the memory value TextBlock (MemoryItemValue), so clicking the value loads the memory item.
  • No view model or code-behind changes. Copying is still available through right-click → Copy; drag-to-select on the text is no longer possible.

How changes were validated:

  • Reproduced in Windows Calculator: clicking the whitespace of a history item loads it, but clicking directly on the expression/result text does nothing.
  • Not yet built or run with this change. Planned manual testing in Standard and Scientific modes: click the expression text, result text, and whitespace of history and memory items (flyout and docked panel) and confirm each loads; confirm right-click → Copy, keyboard (Tab/arrows/Enter) and swipe-to-delete still work.
  • No automated tests added; this is a XAML-only change.

The expression/result TextBlocks in history items and the value TextBlock
in memory items had IsTextSelectionEnabled set, so clicks on the text were
consumed by text selection and never raised the ListView ItemClick. Only
clicks on the surrounding whitespace loaded the item. Disable text
selection so clicking anywhere on an item loads it; copying remains
available via the context menu.
@mohammad19169

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

1 participant