typebot.io icon indicating copy to clipboard operation
typebot.io copied to clipboard

Phone input auto focus after select does not work on iOS

Open baptisteArno opened this issue 2 years ago • 1 comments

baptisteArno avatar Mar 09 '23 13:03 baptisteArno

I'm not sure how to fix this. Another phone component lib has the same issue: https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/173

baptisteArno avatar Mar 20 '23 14:03 baptisteArno

~~💎 $15 bounty created by typebot~~ ~~🙋 If you start working on this, comment /attempt #376 to notify everyone~~ ~~👉 To claim this bounty, submit a pull request that includes the text /claim #376 somewhere in its body~~ ~~📝 Before proceeding, please make sure you can receive payouts in your country~~ ~~💵 Payment arrives in your account 2-5 days after the bounty is rewarded~~ ~~💯 You keep 100% of the bounty award~~ ~~🙏 Thank you for contributing to baptisteArno/typebot.io!~~

Attempt Started (GMT+0) Solution
🟢 @prateekkalra Oct 16, 2023, 2:19:32 PM WIP
🟢 @guptasamarth61 Oct 20, 2023, 7:24:39 AM WIP

algora-pbc[bot] avatar Oct 16 '23 13:10 algora-pbc[bot]

/attempt #376

Options

prateekkalra avatar Oct 16 '23 14:10 prateekkalra

Hi @baptisteArno Could you please describe the issue? How can I reproduce it?

prateekkalra avatar Oct 17 '23 19:10 prateekkalra

See the issue here: https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/173

I've recorded a video

baptisteArno avatar Oct 18 '23 13:10 baptisteArno

/attempt #376

Options

guptasamarth61 avatar Oct 20 '23 07:10 guptasamarth61

Note: The user @prateekkalra is already attempting to complete issue #376 and claim the bounty. If you attempt to complete the same issue, there is a chance that @prateekkalra will complete the issue first, and be awarded the bounty. We recommend discussing with @prateekkalra and potentially collaborating on the same solution versus creating an alternate solution.

algora-pbc[bot] avatar Oct 20 '23 07:10 algora-pbc[bot]

@baptisteArno Did a lot of research on this issue. This seems to be an iphone safari specific issue. So iOS doesn't allow to programmatically focus/click on an input through onChange. It works well inside an onClick(Since it thinks user has clicked). I tried a lot of hacks as well by using onClicks, but the Safari select dropdown doesn't render the options inside the body, so that couldn't be triggered by onClick. Best we can do now to disable input focusing on iphone's safari specifically, so this weird keyboard closing behavior doesn't show up. Let me know if that needs to be done?

prateekkalra avatar Oct 22 '23 19:10 prateekkalra

Closing this as it's not really important.

baptisteArno avatar Jan 11 '24 09:01 baptisteArno