calculator
calculator copied to clipboard
Function won't Show after Pressing Enter if IME is Open in Graphing Mode
Describe the bug
Function won't show after pressing Enter
if IME is open in Graphing Mode.
Also, some strange expressions may be filled in next editbox.
Steps To Reproduce
Steps to reproduce the behavior:
- Go to
Graphing Mode
- Enable the IME (I'm using Chinese IME)
- Input an expression and press
Enter
- Nothing will show on graph
- Input more expressions, and sometimes strange expressions are auto filled in next editbox after pressing
Enter
- Still not works if go back to previous editbox and hit
Enter
again even with IME disabled.
Expected behavior
- Function should be shown after pressing
Enter
with IME open. - No strange expressions should appear.
Screenshots
I never input the 4th function x+3
and 5th function x
but they're filled in next editbox automatically.
Device and Application Information
- OS Build: 10.0.19042.0
- Architecture: x64
- Application Version: 10.2009.4.0
- Region: zh-CN
- Dev Version Installed: True
Requested Assignment
I'm just reporting this problem. I don't want to fix it for now.
This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.
It looks like ITextDocument4::GetMath() method fetched a null result when user types letters with IME.
String ^ MathRichEditBox::GetMathTextProperty()
{
// TODO when Windows 10 version 2004 SDK is adopted, replace with:
// String ^ text;
// this->TextDocument->GetMath(&text);
// return text;
ComPtr<Windows_2004_Prerelease::ITextDocument4> textDocument4;
reinterpret_cast<IInspectable*>(this->TextDocument)->QueryInterface(IID_PPV_ARGS(&textDocument4));
HSTRING math;
auto hr = textDocument4->GetMath(&math); <------------- Line 89 in file MathRichEditBox.cpp
if (FAILED(hr))
{
throw Exception::CreateException(hr);
}
return reinterpret_cast<String ^>(math);
}
An interesting thing is if you try to type numbers before letters while enabling IME, the RichEditBox control can handle it properly.