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

InputItem[type=money] 弹出键盘后再点击Modal[popup]组件, 键盘没有自动隐藏 #2475

Closed
1 task
xiaochunyong opened this issue Apr 19, 2018 · 3 comments · Fixed by #2538
Closed
1 task
Assignees
Labels

Comments

@xiaochunyong
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.1.8

Environment

随意

Reproduction link

https://github.com/xiaochunyong/antd-mobile-issue

Steps to reproduce

启动项目后, 点击额度输入框, 弹出金额数字键盘, 再点击右边的放大镜按钮, 会弹出一个Modal, 但是金额键盘却没有隐藏, 而且也无法隐藏了

What is expected?

能正常隐藏

What is actually happening?

没有隐藏

@ant-design-bot
Copy link

Translation of this issue:


InputItem[type=money] Pop up the keyboard and click on the Modal[popup] component. The keyboard is not automatically hidden

  • [] I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.1.8

Environment

random

Reproduction link

[https://github.com/xiaochunyong/antd-mobile-issue] (https://github.com/xiaochunyong/antd-mobile-issue)

Steps to reproduce

After launching the project, click on the credit limit input box, the amount keypad will pop up, and then click on the right magnifier button, a Modal will pop up, but the amount of the keyboard is not hidden, and it cannot be hidden.

What is expected?

Can hide normally

What is actually happening?

Not hidden

@xiaochunyong
Copy link
Author

半年前我就提交过一次了#2065, 貌似一直没有修复....这个问题很困惑....麻烦快一点修复, 谢谢.

@warmhug
Copy link
Contributor

warmhug commented Apr 23, 2018

首先 在 react 15 下没问题。这样 #2065 的修复应该是没起作用。
在 react 16 下、页面中产生多个实例键盘、多份 dom、出现隐藏错误,待确认是否改为像 react 15 下的单例 单份dom 方式。

@KgTong KgTong self-assigned this May 4, 2018
KgTong added a commit that referenced this issue May 14, 2018
The CustomKeyboard will create as many instance as the InputItem is
used. Remove the container everytime invoke the method `unLinkInput` and
keep only one CustomKeyboard instance

Fixed: #2475
KgTong added a commit that referenced this issue May 14, 2018
The CustomKeyboard will create as many instance as the InputItem is
used. Remove the container everytime invoke the method `unLinkInput` and
keep only one CustomKeyboard instance

Fixed: #2475
KgTong added a commit that referenced this issue May 15, 2018
The CustomKeyboard will create as many instance as the InputItem is
used. Remove the container everytime invoke the method `unLinkInput` and
keep only one CustomKeyboard instance

Fixed: #2475
KgTong added a commit that referenced this issue May 15, 2018
The CustomKeyboard will create as many instance as the InputItem is
used. Remove the container everytime invoke the method `unLinkInput` and
keep only one CustomKeyboard instance

Fixed: #2475
KgTong added a commit that referenced this issue May 17, 2018
In the money type of InputItem, the CustomKeyboard will create as many times as the InputItem is
used.The inner variable `customNumberKeyboard` will point to the latest custom keyboard instance
which can avoid the repeat appearing animation. But when the InputItem is render async, since the
`customNumberKeyboard` points to the latest custom keyboard instance, the operation for previous
custom keyboard instance such as add hidden class  will be invalid

To Solve this problem, remove the useless instances of custom keyboard
everytime one InputItem is being blured

Fixed: #2475
KgTong added a commit that referenced this issue May 17, 2018
In the money type of InputItem, the CustomKeyboard will create as many times as the InputItem is
used.The inner variable `customNumberKeyboard` will point to the latest custom keyboard instance
which can avoid the repeat appearing animation. But when the InputItem is render async, since the
`customNumberKeyboard` points to the latest custom keyboard instance, the operation for previous
custom keyboard instance such as add hidden class  will be invalid

To Solve this problem, remove the useless instances of custom keyboard
everytime one InputItem is being blured

Fixed: #2475
KgTong added a commit that referenced this issue May 17, 2018
In the money type of InputItem, the CustomKeyboard will create as many times as the InputItem is
used.The inner variable `customNumberKeyboard` will point to the latest custom keyboard instance
which can avoid the repeat appearing animation. But when the InputItem is render async, since the
`customNumberKeyboard` points to the latest custom keyboard instance, the operation for previous
custom keyboard instance such as add hidden class  will be invalid

To Solve this problem, remove the useless instances of custom keyboard
everytime one InputItem is being blured

Fixed: #2475
@KgTong KgTong added the bug label May 18, 2018
KgTong added a commit that referenced this issue May 18, 2018
In the money type of InputItem, the CustomKeyboard will create as many times as the InputItem is
used.The inner variable `customNumberKeyboard` will point to the latest custom keyboard instance
which can avoid the repeat appearing animation. But when the InputItem is render async, since the
`customNumberKeyboard` points to the latest custom keyboard instance, the operation for previous
custom keyboard instance such as add hidden class  will be invalid

To Solve this problem, remove the useless instances of custom keyboard
everytime one InputItem is being blured

Fixed: #2475
KgTong added a commit that referenced this issue May 18, 2018
In the money type of InputItem, the CustomKeyboard will create as many times as the InputItem is
used.The inner variable `customNumberKeyboard` will point to the latest custom keyboard instance
which can avoid the repeat appearing animation. But when the InputItem is render async, since the
`customNumberKeyboard` points to the latest custom keyboard instance, the operation for previous
custom keyboard instance such as add hidden class  will be invalid

To Solve this problem, remove the useless instances of custom keyboard
everytime one InputItem is being blured

Fixed: #2475
warmhug pushed a commit that referenced this issue May 18, 2018
…2538)

* Fix(inputitem): add wai-aria suppport for the money type InputItem

The money type InputItem is simulated with the div tag, rather than the origin
input tag. To support wai-aria needs a little more work, for the div tag, by adding
role of `textbox` make div perform like input in aria mode

For the CustomKeyboard, it will lead to wrong focus when not adding aria
supoort for backspace and keyboard canceling

Fixed: #2419, #2418

* Fix(inputitem): remove extra useless custom keyboard instance

In the money type of InputItem, the CustomKeyboard will create as many times as the InputItem is
used.The inner variable `customNumberKeyboard` will point to the latest custom keyboard instance
which can avoid the repeat appearing animation. But when the InputItem is render async, since the
`customNumberKeyboard` points to the latest custom keyboard instance, the operation for previous
custom keyboard instance such as add hidden class  will be invalid

To Solve this problem, remove the useless instances of custom keyboard
everytime one InputItem is being blured

Fixed: #2475
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants