Bug 196322

Summary: [iPad] Tapping on a popup form control may not show a popover
Product: WebKit Reporter: Daniel Bates <dbates>
Component: UI EventsAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, ews-watchlist, megan_gardner, rniwa, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar, PlatformOnly
Version: WebKit Local Build   
Hardware: iPhone / iPad   
OS: iOS 12   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews202 for win-future
none
Archive of layout-test-results from ews122 for ios-simulator-wk2
none
To land
none
To land none

Daniel Bates
Reported 2019-03-27 15:34:15 PDT
Seen on iOS with ToT. Steps to reproduce: Perform on an iPad. 1. Open Settings > General > Keyboards and disable shortcuts. 2. Open Safari and visit <data:text/html,<select><option>First</option><option>Second</option></select>>. 3. Tap the <select> form control. Then nothing happens. But a popover should open.
Attachments
Patch (7.49 KB, patch)
2019-03-27 15:50 PDT, Daniel Bates
no flags
Patch (7.87 KB, patch)
2019-03-27 15:55 PDT, Daniel Bates
no flags
Patch (7.80 KB, patch)
2019-03-27 16:05 PDT, Daniel Bates
no flags
Patch (7.80 KB, patch)
2019-03-27 16:08 PDT, Daniel Bates
no flags
Archive of layout-test-results from ews202 for win-future (12.92 MB, application/zip)
2019-03-27 18:10 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews122 for ios-simulator-wk2 (17.21 MB, application/zip)
2019-03-27 18:24 PDT, EWS Watchlist
no flags
To land (6.37 KB, patch)
2019-03-28 09:32 PDT, Daniel Bates
no flags
To land (6.37 KB, patch)
2019-03-28 09:35 PDT, Daniel Bates
no flags
Daniel Bates
Comment 1 2019-03-27 15:34:40 PDT
Daniel Bates
Comment 2 2019-03-27 15:50:44 PDT
Daniel Bates
Comment 3 2019-03-27 15:55:38 PDT
Daniel Bates
Comment 4 2019-03-27 15:58:48 PDT
Cannot think of a way to write a test for this without going out of my way to programmatically toggle Keyboard Shortcuts :(
Daniel Bates
Comment 5 2019-03-27 16:05:21 PDT
Created attachment 366121 [details] Patch Rebased since <https://bugs.webkit.org/show_bug.cgi?id=196272> has not landed yet.
Daniel Bates
Comment 6 2019-03-27 16:05:50 PDT
Comment on attachment 366121 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366121&action=review > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4871 > +static RetainPtr<NSObject <WKFormPeripheral>> createInputPeripheralWithView(WebKit::InputType type, WKContentView* view) * is on the wrong side.
Daniel Bates
Comment 7 2019-03-27 16:08:11 PDT
EWS Watchlist
Comment 8 2019-03-27 18:09:50 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 9 2019-03-27 18:10:02 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 10 2019-03-27 18:24:55 PDT
Comment on attachment 366122 [details] Patch Attachment 366122 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11689957 New failing tests: fast/forms/datalist/datalist-show-hide.html
EWS Watchlist
Comment 11 2019-03-27 18:24:57 PDT
Created attachment 366139 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Wenson Hsieh
Comment 12 2019-03-27 18:55:26 PDT
(In reply to Build Bot from comment #10) > Comment on attachment 366122 [details] > Patch > > Attachment 366122 [details] did not pass ios-sim-ews (ios-simulator-wk2): > Output: https://webkit-queues.webkit.org/results/11689957 > > New failing tests: > fast/forms/datalist/datalist-show-hide.html This failure looks relevant! Let's look into this (it might just be flaky, but I think it directly exercises -inputView — namely, the branch that returns _dataListTextSuggestionsInputView).
Wenson Hsieh
Comment 13 2019-03-27 18:59:24 PDT
(In reply to Daniel Bates from comment #4) > Cannot think of a way to write a test for this without going out of my way > to programmatically toggle Keyboard Shortcuts :( I can imagine an API test for this that invokes -[WKContentView inputView] directly...
Daniel Bates
Comment 14 2019-03-27 19:24:22 PDT
(In reply to Wenson Hsieh from comment #12) > (In reply to Build Bot from comment #10) > > Comment on attachment 366122 [details] > > Patch > > > > Attachment 366122 [details] did not pass ios-sim-ews (ios-simulator-wk2): > > Output: https://webkit-queues.webkit.org/results/11689957 > > > > New failing tests: > > fast/forms/datalist/datalist-show-hide.html > > This failure looks relevant! Let's look into this (it might just be flaky, > but I think it directly exercises -inputView — namely, the branch that > returns _dataListTextSuggestionsInputView). Yep, that was my thought too.
Daniel Bates
Comment 15 2019-03-27 19:25:29 PDT
(In reply to Wenson Hsieh from comment #13) > (In reply to Daniel Bates from comment #4) > > Cannot think of a way to write a test for this without going out of my way > > to programmatically toggle Keyboard Shortcuts :( > > I can imagine an API test for this that invokes -[WKContentView inputView] > directly... And test what? Nil/non-nil? Maybe looking into the test failure above will give me ideas.
Wenson Hsieh
Comment 16 2019-03-27 19:28:59 PDT
(In reply to Daniel Bates from comment #15) > (In reply to Wenson Hsieh from comment #13) > > (In reply to Daniel Bates from comment #4) > > > Cannot think of a way to write a test for this without going out of my way > > > to programmatically toggle Keyboard Shortcuts :( > > > > I can imagine an API test for this that invokes -[WKContentView inputView] > > directly... > > And test what? Nil/non-nil? Maybe looking into the test failure above will > give me ideas. Yeah, that's just about all I think a test like that could check :/ Such an API test would probably not be worth the effort.
Daniel Bates
Comment 17 2019-03-28 09:26:25 PDT
Comment on attachment 366122 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366122&action=review > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:1642 > + if (!hasFocusedElement(_focusedElementInformation) || !_inputPeripheral) Didn't even need to try. Sleep fixes things. This is the line with the bug. We can't early return when we don't have an _inputPeripheral. Why did I make this change? It's because I so want this function to do one thing: only know about input peripheral. The reality is that it can't do one thing we may have a custom view or a data list thingy.
Daniel Bates
Comment 18 2019-03-28 09:32:09 PDT
Daniel Bates
Comment 19 2019-03-28 09:35:07 PDT
Daniel Bates
Comment 20 2019-03-28 09:36:25 PDT
Note You need to log in before you can comment on or make changes to this bug.