Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a166cbc7846f1df9bac19ca8a314f333e122d8bb
      
https://github.com/WebKit/WebKit/commit/a166cbc7846f1df9bac19ca8a314f333e122d8bb
  Author: Wenson Hsieh <wenson_hs...@apple.com>
  Date:   2024-01-24 (Wed, 24 Jan 2024)

  Changed paths:
    M Source/WebKit/UIProcess/ios/forms/WKDatePickerPopoverController.mm

  Log Message:
  -----------
  [iOS] Time picker fails to blur after tapping the page while editing 
hour/minute text fields
https://bugs.webkit.org/show_bug.cgi?id=268046
rdar://119175928

Reviewed by Aditya Keerthi.

When editing hour/minute text fields while a time picker is presented and then 
tapping any non-
editable content on the page to dismiss the time picker and keyboard, the
`-presentationControllerDidDismiss:` `UIPopoverPresentationControllerDelegate` 
method never gets
invoked by UIKit. As a result, we end up never sending `-accessoryDone` back to 
the content view and
blurring the time input, which then gets us into a state where subsequent 
attempts to focus the time
input fail to show a popover, because the content view is still in a state 
where it thinks the
popover is still presenting.

To address this, we can instead override `-viewDidDisappear:` and notify the 
popover controller
delegate if needed, which is (luckily) still invoked in this scenario.

* Source/WebKit/UIProcess/ios/forms/WKDatePickerPopoverController.mm:
(-[WKDatePickerPopoverController viewDidDisappear:]):

Canonical link: https://commits.webkit.org/273469@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to