Changeset 247875 in webkit


Ignore:
Timestamp:
Jul 26, 2019 1:52:14 PM (5 years ago)
Author:
dbates@webkit.org
Message:

[iOS] REGRESSION: Keyboard dismisses and reappears when typing 2FA pin on appleid.apple.com
https://bugs.webkit.org/show_bug.cgi?id=200171
<rdar://problem/50245251>

Reviewed by Wenson Hsieh.

Take out an InputViewUpdateDeferrer token (if we don't already have one) to temporarily defer
tearing down the input view (keyboard) before bluring the previously focused element as part
of switching between focused elements. This avoid a noticeable flash caused by UIKit animating
out and animating in the keyboard should the newly focused element require the keyboard. We
only take out the InputViewUpdateDeferrer until we fall off the end of _elementDidFocus: (or
bail early). Once we fall of the end UIKit will update input view UI.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r247872 r247875  
     12019-07-26  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] REGRESSION: Keyboard dismisses and reappears when typing 2FA pin on appleid.apple.com
     4        https://bugs.webkit.org/show_bug.cgi?id=200171
     5        <rdar://problem/50245251>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        Take out an InputViewUpdateDeferrer token (if we don't already have one) to temporarily defer
     10        tearing down the input view (keyboard) before bluring the previously focused element as part
     11        of switching between focused elements. This avoid a noticeable flash caused by UIKit animating
     12        out and animating in the keyboard should the newly focused element require the keyboard. We
     13        only take out the InputViewUpdateDeferrer until we fall off the end of _elementDidFocus: (or
     14        bail early). Once we fall of the end UIKit will update input view UI.
     15
     16        * UIProcess/ios/WKContentViewInteraction.mm:
     17        (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
     18
    1192019-07-26  Chris Dumez  <cdumez@apple.com>
    220
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r247868 r247875  
    52825282    }();
    52835283
    5284     if (blurPreviousNode)
     5284    if (blurPreviousNode) {
     5285        // Defer view updates until the end of this function to avoid a noticeable flash when switching focus
     5286        // between elements that require the keyboard.
     5287        if (!inputViewUpdateDeferrer)
     5288            inputViewUpdateDeferrer = std::make_unique<WebKit::InputViewUpdateDeferrer>(self);
    52855289        [self _elementDidBlur];
     5290    }
    52865291
    52875292#if HAVE(PENCILKIT)
Note: See TracChangeset for help on using the changeset viewer.