Summary: | [iOS][WK2] Distant focusable element may not be scrolled into view when focused using keyboard | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||||||||
Component: | WebKit2 | Assignee: | Daniel Bates <dbates> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | benjamin, bunhere, cdumez, commit-queue, ddkilzer, enrica, gyuyoung.kim, rniwa, sergio | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | iPhone / iPad | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Created attachment 233841 [details] Patch and manual test I'm unclear how to write a DRT test for this change. Maybe we can write a TestWebKitAPI test? I'm open to suggestions. For now, I included a manual test that is similar to example attached to this bug (attachment #233839 [details]). The approach taken in this patch was inspired by an in-person discussion yesterday (06/24) with Enrica Casucci. Comment on attachment 233841 [details]
Patch and manual test
I don't think you need to do it in the WebProcess. You know in the UIProcess if the < > buttons have been pressed and you can replace the selection rect with an empty rect before calling zoomToFocusNode.
Created attachment 233851 [details]
Patch and manual test
Updated patch based on Enrica Casucci's feedback.
Comment on attachment 233851 [details] Patch and manual test View in context: https://bugs.webkit.org/attachment.cgi?id=233851&action=review > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h:139 > + BOOL _didAccessoryTabInitiateFocus; Don't forget to clear this in the crash handler. Created attachment 233903 [details]
Patch and manual test
Upated patch based on Benjamin Poulain's feedback; clear _didAccessoryTabInitiateFocus in -[WKContentView cleanupInteraction]
Created attachment 233929 [details]
Patch and manual test
Rebased patch
Attachment 233929 [details] did not pass style-queue:
ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:628: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3]
Total errors found: 1 in 5 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 233929 [details] Patch and manual test Clearing flags on attachment: 233929 Committed r170518: <http://trac.webkit.org/changeset/170518> All reviewed patches have been landed. Closing bug. |
Created attachment 233839 [details] Example Focusing a distant focusable element using the keyboard accessory may not scroll the newly focused element into view, 1. Open the attached test case, example.html, in Safari for iOS. 2. Follow the instructions in the test case.