Bug 195819 - REGRESSION (r242173): Programmatically focusing <select> after user dismisses it does not open it again and leaves view in bad state
Summary: REGRESSION (r242173): Programmatically focusing <select> after user dismisses...
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad iOS 12
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar, PlatformOnly, Regression
Depends on: 195118 196272
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-15 13:53 PDT by Daniel Bates
Modified: 2019-03-26 21:26 PDT (History)
2 users (show)

See Also:


Attachments
Test (583 bytes, text/html)
2019-03-15 13:53 PDT, Daniel Bates
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2019-03-15 13:53:08 PDT
Created attachment 364836 [details]
Test

Seen on iPad.

Steps to reproduce:

The following assume you have a hardware keyboard attached.

1. Open the attached test case.
2. Follow the instructions.

The test fails following <https://trac.webkit.org/changeset/242173/> (bug #195118). Prior to the change, it passed.

Notes:

When the bug occurs the WKContentView is *NOT* the first responder. If you then tap somewhere on page we make the WKContentView first responder and the popover opens!
Comment 1 Radar WebKit Bug Importer 2019-03-15 13:53:25 PDT
<rdar://problem/48937037>
Comment 2 Radar WebKit Bug Importer 2019-03-15 13:53:25 PDT
<rdar://problem/48937038>
Comment 3 Wenson Hsieh 2019-03-15 14:54:27 PDT
This is because of my new first responder restriction when determining whether to allow programmatic focus to present an input view.

Namely, after r242173, when WKContentView is not first responder, we’ll no longer allow programmatic focus to show an input view (this is to prevent web content from stealing focus away from page chrome using programmatic focus).

Need to think more about what our policy should be in this scenario...any change that would prevent users from being able to switch tabs or type in the unified field and navigate away in this case is a non-starter.
Comment 4 Daniel Bates 2019-03-26 21:26:13 PDT
I will fix this issue in the patch for bug #196272. Keeping this bug open to remind myself to add a test for this bug.