brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 441 forks source link

Autofocus on url bar, when NTP is opened with hardware keyboard connected #3877

Open iccub opened 3 years ago

iccub commented 3 years ago

Description:

Steps to Reproduce

  1. Connect hardware keyboard
  2. Open new tab by CMD+T

Actual result: User input is not focused on url bar

Expected result:

Reproduces how often: [Easily reproduced, Intermittent Issue]

Brave Version:

Device details:

Website problems only:

Additional Information

KacperWybranski commented 3 years ago

Can I take up this issue?

iccub commented 3 years ago

sure @KacperWybranski To do this ticket we have to focus on url bar only when a hardware keyboard is connected. If a software keybord(the one visible on screen) is used, no autofocus should happen

This is so the user is able to see empty new tab page, with Brave News etc.

Biggest challenge is finding a way to detect whether a hardware or software keyboard is used, which may be hard, this requires some investigation work first

Feel free to post in this ticket if you have any questions

iccub commented 3 years ago

Let me ask formally our design person if this change is ok, thoughts @jamesmudgett? we want to focus on url bar only if hardware keyboard is connecter so nothing covers the NTP

iccub commented 3 years ago

This is good to go btw if any contributor wants to pick this up, not sure if i mentioned that somewhere else

KacperWybranski commented 3 years ago

Hi, sorry for not commiting, I was waiting for the confirmation :) it turned out to be pretty easy in iOS 14 and later with GameController framework but requires creating textfield and firing some invisible keyboard to detect in prior versions - I'm not sure if its fine for you?

iccub commented 3 years ago

Making this iOS 14+ only is perfectly fine

Vercety87 commented 6 months ago

Hi, problem still occurs nowadays. I have an iPad Pro fully up to date with official Magic Keyboard. Looking for it. Thanks.