Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save and restore the value of EquationInputArea when users scroll #866

Merged
merged 3 commits into from
Dec 14, 2019
Merged

Save and restore the value of EquationInputArea when users scroll #866

merged 3 commits into from
Dec 14, 2019

Conversation

rudyhuyn
Copy link
Contributor

@rudyhuyn rudyhuyn commented Dec 13, 2019

The current implementation never saved/restored the value of EquationInputAreas when users scrolled the list and DataTemplate where recycled by the list virtualization

Description of the changes:

  • Refactor MathRichEditBox and add a (real) dependency property (the existing one were used a regular property) we can use for bindings.
  • Move submission detection from EquationInputArea to MathRichEditBox

Also:

  • Because the submission detection is faster, other items don't get the focus when users press many times Enter.

How to test?

  • Enter 4-5 equations
  • Type Enter many times to add more than 16 'empty' equations
    Before: Because of the virtualization, new equations will be initialized with some of the first equations you typed (and vice-versa, the first equations will disappear if you scroll up)
    After: The equations won't be mixed up

How changes were validated:

  • manually

@EriWong EriWong added the graphing calculator Work items related to the graphing calculator feature. label Dec 13, 2019
Copy link
Contributor

@EriWong EriWong left a comment

Choose a reason for hiding this comment

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

With your changes applied, I'm seeing a crash around focus when changing an existing equation.

Repro steps:
Set equation to x and submit it.
Change equation to 2x and resubmit.

result: "Focus cannot be moved while getting or losing focus."

@rudyhuyn
Copy link
Contributor Author

Focus cannot be moved while getting or losing focus

I can't repro but I will try to catch this issue

@ghost ghost removed the needs author feedback label Dec 13, 2019
Copy link
Contributor

@EriWong EriWong left a comment

Choose a reason for hiding this comment

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

Looks good and works well.

@EriWong EriWong merged commit dbddc7b into microsoft:feature/GraphingCalculator Dec 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graphing calculator Work items related to the graphing calculator feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants