Bug 199807

Summary: [iOS] REGRESSION (r241734): Autocorrection highlight should hide when field becomes defocused
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebKit Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: megan_gardner, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar, PlatformOnly, Regression
Version: WebKit Local Build   
Hardware: iPhone / iPad   
OS: Unspecified   
URL: data:text/html,<input><button>Tap</button>
See Also: https://bugs.webkit.org/show_bug.cgi?id=197746
Bug Depends on: 192824    
Bug Blocks: 190571    
Attachments:
Description Flags
For the bots
none
For the Bots
none
Alternative for the bots
none
Alt for the bots
none
Patch none

Description Daniel Bates 2019-07-15 14:17:14 PDT
Steps to reproduce:

1. Attach hardware keyboard.
2. Visit <data:text/html,<input><button>Tap</button>>.
3. Press any key, say a.
4. Focus the field, type something that would be autocorrected, say djn.
5. Once the autocorrection highlight appears, tap the button.

Then the autocorrection highlight should hide. But it remains visible.
Comment 1 Daniel Bates 2019-07-15 14:17:31 PDT
<rdar://problem/52760259>
Comment 2 Daniel Bates 2019-07-15 14:18:42 PDT
Created attachment 374148 [details]
For the bots
Comment 3 Daniel Bates 2019-07-15 15:28:19 PDT
Patch no good. Already nilled the inputDelegate
Comment 4 Daniel Bates 2019-07-15 16:03:06 PDT
Created attachment 374160 [details]
For the Bots
Comment 5 Daniel Bates 2019-07-17 16:37:50 PDT
Created attachment 374348 [details]
Alternative for the bots
Comment 6 Daniel Bates 2019-07-17 16:40:29 PDT
Created attachment 374349 [details]
Alt for the bots
Comment 7 Daniel Bates 2019-07-18 15:41:27 PDT
Created attachment 374421 [details]
Patch

It is not possible to write a reproducible test case for this change at the moment because the Input Manager learns to ignore misspelling when a correction is repeatedly ignored/rejected (say, as a result of running a test more than once) and these learnings persist across Simulator reboots. There is no way to tell the Input Manager to unlearn a misspelling as far as I can tell.
Comment 8 Daniel Bates 2019-07-19 14:58:18 PDT
Comment on attachment 374421 [details]
Patch

Clearing flags on attachment: 374421

Committed r247653: <https://trac.webkit.org/changeset/247653>
Comment 9 Daniel Bates 2019-07-19 14:58:20 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Daniel Bates 2019-07-22 10:29:54 PDT
(In reply to Daniel Bates from comment #8)
> Comment on attachment 374421 [details]
> Patch
> 
> Clearing flags on attachment: 374421
> 
> Committed r247653: <https://trac.webkit.org/changeset/247653>

Wow! This is a bad merge. Svn-apply couldn't find -_didCommitLoadForMainFrame and patch  -clearSelection instead
Comment 11 Daniel Bates 2019-07-22 10:35:48 PDT
Fixed bad merge in <https://trac.webkit.org/changeset/247687>