Bug 193048 - [iOS] Pressing Tab key doesn't move to next cell with Google Sheets
Summary: [iOS] Pressing Tab key doesn't move to next cell with Google Sheets
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad iOS 12
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks: 190571 193846
  Show dependency treegraph
 
Reported: 2018-12-28 11:59 PST by Daniel Bates
Modified: 2019-01-25 15:12 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2018-12-28 12:18 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (1.93 KB, patch)
2019-01-02 10:57 PST, Daniel Bates
dbates: review+
Details | Formatted Diff | Diff
Patch - needs updated ChangeLog (3.21 KB, patch)
2019-01-22 17:03 PST, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-12-28 11:59:19 PST
DOM events for the tab key are not dispatched as a result pressing the tab key in a Google Sheets document does not behave as it does on Mac.

Steps to reproduce:

1. Launch Safari.
2. Navigate to <https://sheets.google.com/>.
3. Open a spreadsheet.
4. Focus a cell.
5. Press the tab key.

Then nothing happens. But the cell in the adjacent column on the right should be focused.
Comment 1 Daniel Bates 2018-12-28 11:59:30 PST
<rdar://problem/46433836>
Comment 2 Daniel Bates 2018-12-28 12:18:37 PST
Created attachment 358120 [details]
Patch

I suspect the reason we added these key commands was to work around an issue where key events when pressing Tab or Shift + Tab inside a password field would not be sent to WebKit as a result of UIKit decision to disallow the tab character inside a password field for native apps. I will fix address the UIKit issue in <rdar://problem/46972559>. For now, I did not include a test. I will add a test in a follow up bug.
Comment 3 Daniel Bates 2018-12-28 12:20:37 PST
Comment on attachment 358120 [details]
Patch

err, this patch will Tab and Shift + Tab in password fields in break current shipping iOS. Need to add some compile-time guards.
Comment 4 Daniel Bates 2019-01-02 10:57:05 PST
Created attachment 358185 [details]
Patch
Comment 5 Brent Fulgham 2019-01-04 13:19:03 PST
Comment on attachment 358185 [details]
Patch

LGTM. r=me.
Comment 6 Daniel Bates 2019-01-22 17:01:32 PST
Comment on attachment 358185 [details]
Patch

r-, this patch is insufficient as we need to support pressing tab to cycle out of form controls, such as <select>. Currently we make use of the fact that key commands are interpreted  even though we do not have a keyboard on iPad.
Comment 7 Daniel Bates 2019-01-22 17:03:32 PST
Created attachment 359811 [details]
Patch - needs updated ChangeLog
Comment 8 Daniel Bates 2019-01-25 14:32:07 PST
Comment on attachment 358185 [details]
Patch

I changed my mind. The original patch is OK as-is so long as it lands before bug #192824. When I r-'ed this patch it was before I had amended the patch on bug #192824 to support tab cycling from a focused <select> (and I got confused as to which patch was to blame - this one or the one on bug #192824 since I have both applied in my local repo :P). I've sorted it out, want this patch to land first, and updated the patch for bug #192824 to ensure it will not regress the fix made in this patch.

Filed bug #193846 to add tests for this change.
Comment 9 Daniel Bates 2019-01-25 15:12:50 PST
Committed r240514: <https://trac.webkit.org/changeset/240514>