⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245283 in webkit


Ignore:
Timestamp:
May 14, 2019, 9:22:32 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[iOS] Cannot tab or shift + tab out of address bar on google.com
https://bugs.webkit.org/show_bug.cgi?id=197859
<rdar://problem/46651565>

Patch by Daniel Bates <dabates@apple.com> on 2019-05-14
Reviewed by Darin Adler.

Non-editable elements can participate in tab cycling via the HTML tabindex attribute.
We should allow setting the initial focus to such an element when transitioning from
the chrome (e.g. address bar) to the web page.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r245281 r245283  
     12019-05-14  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Cannot tab or shift + tab out of address bar on google.com
     4        https://bugs.webkit.org/show_bug.cgi?id=197859
     5        <rdar://problem/46651565>
     6
     7        Reviewed by Darin Adler.
     8
     9        Non-editable elements can participate in tab cycling via the HTML tabindex attribute.
     10        We should allow setting the initial focus to such an element when transitioning from
     11        the chrome (e.g. address bar) to the web page.
     12
     13        * UIProcess/ios/WKContentViewInteraction.mm:
     14        (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
     15
    1162019-05-14  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r245268 r245283  
    37953795- (void)_becomeFirstResponderWithSelectionMovingForward:(BOOL)selectingForward completionHandler:(void (^)(BOOL didBecomeFirstResponder))completionHandler
    37963796{
    3797     auto completionHandlerCopy = Block_copy(completionHandler);
    3798     RetainPtr<WKContentView> view = self;
    3799     _page->setInitialFocus(selectingForward, false, WebKit::WebKeyboardEvent(), [view, completionHandlerCopy](WebKit::CallbackBase::Error) {
    3800         BOOL didBecomeFirstResponder = view->_focusedElementInformation.elementType != WebKit::InputType::None && [view becomeFirstResponder];
    3801         completionHandlerCopy(didBecomeFirstResponder);
    3802         Block_release(completionHandlerCopy);
     3797    constexpr bool isKeyboardEventValid = false;
     3798    _page->setInitialFocus(selectingForward, isKeyboardEventValid, { }, [protectedSelf = retainPtr(self), completionHandler = makeBlockPtr(completionHandler)] (auto) {
     3799        completionHandler([protectedSelf becomeFirstResponder]);
    38033800    });
    38043801}
Note: See TracChangeset for help on using the changeset viewer.