diff options
Diffstat (limited to 'fxjs/cjs_publicmethods.cpp')
-rw-r--r-- | fxjs/cjs_publicmethods.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fxjs/cjs_publicmethods.cpp b/fxjs/cjs_publicmethods.cpp index d613f4888a..28df0a305b 100644 --- a/fxjs/cjs_publicmethods.cpp +++ b/fxjs/cjs_publicmethods.cpp @@ -1009,8 +1009,8 @@ CJS_Return CJS_PublicMethods::AFNumber_Keystroke( bool bHasSign = wstrValue.Contains(L'-') && !wstrSelected.Contains(L'-'); if (bHasSign) { - // can't insert "change" in front to sign postion. - if (pEvent->SelStart() == 0) { + // can't insert "change" in front of sign position. + if (!wstrSelected.IsEmpty() && pEvent->SelStart() == 0) { pEvent->Rc() = false; return CJS_Return(true); } |