Bug 134409 - [iOS][WK2] <select> tapping "next" does not save new picker value
Summary: [iOS][WK2] <select> tapping "next" does not save new picker value
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
Keywords: InRadar
Depends on:
Reported: 2014-06-27 13:42 PDT by Joseph Pecoraro
Modified: 2016-09-07 21:49 PDT (History)
2 users (show)

See Also:

[PATCH] Proposed Fix (3.05 KB, patch)
2014-06-27 13:50 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-06-27 13:42:08 PDT


1. Tap the first <select>
2. Move the wheel to a "Yellow"
3. Tap Next in accessory
  => "Cyan" is still selected. Expected "Yellow" to be selected.
Comment 1 Joseph Pecoraro 2014-06-27 13:42:52 PDT
Comment 2 Joseph Pecoraro 2014-06-27 13:46:48 PDT
So, two potential issues here.

1. We were accidentally not calling endEditing in -_stopAssistingNode in WK2.
  - I think this should always be the case to ensure we call -controlEndEditing which only <select> cares about

2. Calling endEditing in -_stopAssistingNode is too late in this case. It seem in the WK2 model:
  - UIProcess tells the WebProcess to move focus to the next field
  - WebProcess updates the assisted node
  - WebProcess tells the UIProcess to start assisting a new node
  - if the UIProcess at this point says "update the value of the assisted node" it updates the wrong node

So it seems like we should handle -accessoryTab in a special way. We don't want to do everything that stopAssistingNode does (it starts dismissing the keyboard) but we do want the control to endEditing. I say we trigger the endEditing at this point because we know we are going to change focus and run the rest anyways.

Patch to follow.
Comment 3 Joseph Pecoraro 2014-06-27 13:50:55 PDT
Created attachment 234013 [details]
[PATCH] Proposed Fix
Comment 4 Enrica Casucci 2014-06-27 13:55:44 PDT
Comment on attachment 234013 [details]
[PATCH] Proposed Fix

Sounds very reasonable to me.
Comment 5 WebKit Commit Bot 2014-06-27 14:36:58 PDT
Comment on attachment 234013 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 234013

Committed r170554: <http://trac.webkit.org/changeset/170554>