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

safari下日文输入法下有format时输入数字时数据重复 #508

Open
larryliu95 opened this issue Nov 14, 2022 · 1 comment
Open

Comments

@larryliu95
Copy link

safari下日文输入法下有format时输入数字时数据重复。
safari环境下,日文输入法,非小键盘。输入数字1,显示1 继续刷入2,显示112,在输入3显示112123.
应该是光标控制存在问题。

@nakazavva
Copy link

FYI

I am currently testing my application with the Japanese IME, using the following patch applied through patch-package. It seems to be working well. I'm going to make a PR later on.

diff --git a/node_modules/rc-input-number/lib/InputNumber.js b/node_modules/rc-input-number/lib/InputNumber.js
index 0de314f..9252e10 100644
--- a/node_modules/rc-input-number/lib/InputNumber.js
+++ b/node_modules/rc-input-number/lib/InputNumber.js
@@ -480,7 +480,7 @@ var InternalInputNumber = /*#__PURE__*/React.forwardRef(function (props, ref) {

   // ============================ Cursor ============================
   (0, _useLayoutEffect.useLayoutUpdateEffect)(function () {
-    if (formatter) {
+    if (formatter && userTypingRef.current) {
       restoreCursor();
     }
   }, [inputValue]);

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

No branches or pull requests

2 participants