Page MenuHomePhabricator

Clicking the search bar on mobile-web doesn't always open the keyboard
Closed, DuplicatePublic

Description

I spotted this problem sometimes on my own phone, too, however, I wasn't able to explicitly reproduce this behavior, and because no-one else seemed to have the same problem, I haven't really reported it somewhere. Now, an user reported the same problem in OTRS:
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=9434601#11210665

The problem:
If you open Wikipedia the first time since a long time (this is just a guess, and I can't say what "long time" means), and tap on the search bar you would expect, that the search overlay "starts" and the keyboard opens. However, sometimes, the keyboard doesn't open or opens for just a moment and automatically closes again. We should investigate this and probably find a way to safely reproduce this and fix it.

Device: HTC One M9
OS: Android 6.0.1
Browser: Chrome mobile 53.0.2785.124

Event Timeline

Florian created this task.Oct 5 2016, 5:46 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 5 2016, 5:46 AM
ovasileva triaged this task as Normal priority.Oct 5 2016, 4:14 PM
ovasileva moved this task from To Triage to Needs Analysis on the Readers-Web-Backlog board.

Someone please update the description with more info about the OS/browser if they have it.

Florian updated the task description. (Show Details)Oct 5 2016, 5:55 PM

This is because you cannot programmatically trigger a focus event in some browser due to accessiblity reasons.
https://phabricator.wikimedia.org/T42986#427076 [I wish I linked to the problem at the time]

The problem recurs on the web but without solution
http://stackoverflow.com/questions/6767071/forcing-keyboard-to-display-when-a-text-input-is-selected
http://stackoverflow.com/questions/35940550/js-disable-keyboard-on-windows-phone-8-1-ie-on-input-focus

I wonder if autofocus attribute could be used to fix this?