Changeset 246570 in webkit
- Timestamp:
- Jun 18, 2019 2:50:20 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246567 r246570 1 2019-06-18 Daniel Bates <dabates@apple.com> 2 3 REGRESSION (r240757): Cannot dismiss the keyboard on http://apple.com/apple-tv-plus 4 https://bugs.webkit.org/show_bug.cgi?id=198922 5 <rdar://problem/50300056> 6 7 Reviewed by Wenson Hsieh. 8 9 Add a test to ensure that pressing Done hides the keyboard after tapping outside the focused 10 element's frame. 11 12 * fast/events/ios/should-be-able-to-dismiss-form-accessory-after-tapping-outside-iframe-with-focused-field-expected.txt: Added. 13 * fast/events/ios/should-be-able-to-dismiss-form-accessory-after-tapping-outside-iframe-with-focused-field.html: Added. 14 * resources/ui-helper.js: 15 (window.UIHelper.dismissFormAccessoryView): Added. 16 1 17 2019-06-18 Alexey Shvayka <shvaikalesh@gmail.com> 2 18 -
trunk/LayoutTests/resources/ui-helper.js
r246004 r246570 352 352 } 353 353 354 static dismissFormAccessoryView() 355 { 356 if (!this.isWebKit2() || !this.isIOSFamily()) 357 return Promise.resolve(); 358 359 return new Promise(resolve => { 360 testRunner.runUIScript(` 361 (function() { 362 uiController.dismissFormAccessoryView(); 363 uiController.uiScriptComplete(); 364 })()`, resolve); 365 }); 366 } 367 354 368 static isShowingKeyboard() 355 369 { -
trunk/Source/WebKit/ChangeLog
r246569 r246570 1 2019-06-18 Daniel Bates <dabates@apple.com> 2 3 REGRESSION (r240757): Cannot dismiss the keyboard on http://apple.com/apple-tv-plus 4 https://bugs.webkit.org/show_bug.cgi?id=198922 5 <rdar://problem/50300056> 6 7 Reviewed by Wenson Hsieh. 8 9 Actually dismiss the keyboard as intended in r240757. Do not wait for the round-trip 10 to the WebProcess to run through the -elementDidBlur steps in the UIProcess and hide 11 the keyboard when a person explicitly dismisses the keyboard via the Done button (iPhone) 12 or hide keyboard button (iPad). 13 14 Note that r240757 revealed another bug in this code, <https://bugs.webkit.org/show_bug.cgi?id=198928>. 15 I am unclear of the implications of that bug, but it is clear for this bug that it 16 never makes sense to round-trip to the WebProcess when the keyboard is dismissed by 17 a user gesture. 18 19 * UIProcess/ios/WKContentViewInteraction.mm: 20 (-[WKContentView endEditingAndUpdateFocusAppearanceWithReason:]): Invoke -_elementDidBlur 21 to blur the element in the UIProcess and hide the keyboard. 22 (-[WKContentView _elementDidBlur]): Prevent duplicate invocations of -didEndFormControlInteraction 23 and setIsShowingInputViewForFocusedElement messages by only doing these actions when 24 editablity changes. This covers the case where -_elementDidBlur may be invoked a second 25 time (the reply in the round-trip). In that case we don't need to do these actions. 26 1 27 2019-06-18 Alex Christensen <achristensen@webkit.org> 2 28 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r246564 r246570 1227 1227 // We need to complete the editing operation before we blur the element. 1228 1228 [self _endEditing]; 1229 if ((reason == EndEditingReasonAccessoryDone && !currentUserInterfaceIdiomIsPad()) || _keyboardDidRequestDismissal) 1229 if ((reason == EndEditingReasonAccessoryDone && !currentUserInterfaceIdiomIsPad()) || _keyboardDidRequestDismissal) { 1230 1230 _page->blurFocusedElement(); 1231 // Don't wait for WebPageProxy::blurFocusedElement() to round-trip back to us to hide the keyboard 1232 // because we know that the user explicitly requested us to do so. 1233 [self _elementDidBlur]; 1234 } 1231 1235 } 1232 1236 … … 5283 5287 #endif 5284 5288 5285 // The custom fixed position rect behavior is affected by -isFocusingElement, so if that changes we need to recompute rects.5286 if (editableChanged)5289 if (editableChanged) { 5290 // The custom fixed position rect behavior is affected by -isFocusingElement, so if that changes we need to recompute rects. 5287 5291 [_webView _scheduleVisibleContentRectUpdate]; 5288 5292 5289 [_webView didEndFormControlInteraction]; 5290 _page->setIsShowingInputViewForFocusedElement(false); 5293 [_webView didEndFormControlInteraction]; 5294 _page->setIsShowingInputViewForFocusedElement(false); 5295 } 5291 5296 5292 5297 if (!_isChangingFocus)
Note: See TracChangeset
for help on using the changeset viewer.