Bug 188251 - [iOS] Keyboard becomes unresponsive after pressing delete while pressing down on a character key with accents
Summary: [iOS] Keyboard becomes unresponsive after pressing delete while pressing down...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-01 22:18 PDT by Wenson Hsieh
Modified: 2018-08-02 11:32 PDT (History)
5 users (show)

See Also:


Attachments
Patch (22.88 KB, patch)
2018-08-01 23:32 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (22.91 KB, patch)
2018-08-02 08:02 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2018-08-01 22:18:13 PDT
<rdar://problem/37842108>
Comment 1 Wenson Hsieh 2018-08-01 22:20:05 PDT
This following code:

- (void)handleKeyWebEvent:(::WebEvent *)theEvent withCompletionHandler:(void (^)(::WebEvent *theEvent, BOOL wasHandled))completionHandler
{
    _keyWebEventHandler = [completionHandler copy];
    _page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent));
}

- (void)_didHandleKeyEvent:(::WebEvent *)event eventWasHandled:(BOOL)eventWasHandled
{
    if (_keyWebEventHandler) {
        _keyWebEventHandler(event, eventWasHandled);
        [_keyWebEventHandler release];
        _keyWebEventHandler = nil;
        return;
    }

…

}

...is not robust in the case where the key event completion handler calls back into -handleKeyWebEvent:withCompletionHandler:, since we'll just end up stomping over the newly stored completion block in the next line.
Comment 2 Wenson Hsieh 2018-08-01 23:32:16 PDT
Created attachment 346360 [details]
Patch
Comment 3 Wenson Hsieh 2018-08-02 08:02:07 PDT
Created attachment 346380 [details]
Patch
Comment 4 Wenson Hsieh 2018-08-02 11:05:33 PDT
Comment on attachment 346380 [details]
Patch

Thanks for the review!
Comment 5 WebKit Commit Bot 2018-08-02 11:32:29 PDT
Comment on attachment 346380 [details]
Patch

Clearing flags on attachment: 346380

Committed r234504: <https://trac.webkit.org/changeset/234504>
Comment 6 WebKit Commit Bot 2018-08-02 11:32:31 PDT
All reviewed patches have been landed.  Closing bug.