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

Bug on iOS, need to click twice on the input to open the keyboard #27

Open
Makio64 opened this issue Jun 25, 2020 · 1 comment
Open

Comments

@Makio64
Copy link

Makio64 commented Jun 25, 2020

What happen :
On iOS Chrome / Safari 13.5 on the first click it take the focus but the it didn't open the keyboard

Behavior expected :
We click it take the focus and open the keyboard

What we try :
use focus() one or more time on touch
use select() one or more time on touch

Note :
The bug is easily reproducible on the demo link
It works as expected on Android.

Thanks in advance.

@mingyuLi97
Copy link

放置到 container 容器里,监听点击事件,根据点击的区域设置 focus()

   this.container.addListener('tap', (e: InteractionEvent) => {
      const { x, y, width, height } = input.getBounds();
      const { x: eX, y: eY } = e.data.global;
      if (eX >= x && eX <= x + width && eY >= y && eY <= y + height) {
       input.focus();
      }
    });

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