Fix crash when tabbing through KGF (#1037)

* Check readonly

* Update src/Calculator/Controls/MathRichEditBox.cpp

Co-Authored-By: Rudy Huyn <rudyhuyn@gmail.com>

Co-authored-by: Rudy Huyn <rudyhuyn@gmail.com>
This commit is contained in:
Pepe Rivera 2020-02-14 15:01:43 -08:00 committed by GitHub
parent 11ab829b1b
commit 8483b68f12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,10 @@ void MathRichEditBox::SetMathTextProperty(String ^ newValue)
void CalculatorApp::Controls::MathRichEditBox::OnLosingFocus(Windows::UI::Xaml::UIElement ^ sender, Windows::UI::Xaml::Input::LosingFocusEventArgs ^ args)
{
SubmitEquation(EquationSubmissionSource::FOCUS_LOST);
if (!this->IsReadOnly)
{
SubmitEquation(EquationSubmissionSource::FOCUS_LOST);
}
}
void CalculatorApp::Controls::MathRichEditBox::OnKeyUp(Platform::Object ^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs ^ e)