Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a107e5c0a7606a6d5fef43b7d5611b730294577c
      
https://github.com/WebKit/WebKit/commit/a107e5c0a7606a6d5fef43b7d5611b730294577c
  Author: Cole Carley <[email protected]>
  Date:   2026-06-08 (Mon, 08 Jun 2026)

  Changed paths:
    A 
LayoutTests/editing/selection/ios/select-text-by-long-press-with-focused-element-expected.txt
    A 
LayoutTests/editing/selection/ios/select-text-by-long-press-with-focused-element.html
    A 
LayoutTests/editing/selection/ios/select-text-by-long-press-with-hardware-keyboard-expected.txt
    A 
LayoutTests/editing/selection/ios/select-text-by-long-press-with-hardware-keyboard.html
    A 
LayoutTests/editing/selection/ios/tap-focused-input-clears-outside-selection-expected.txt
    A 
LayoutTests/editing/selection/ios/tap-focused-input-clears-outside-selection.html
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

  Log Message:
  -----------
  iOS selection and editable content interaction should match UIKit behavior
https://bugs.webkit.org/show_bug.cgi?id=316445
rdar://178846185

Reviewed by Wenson Hsieh.

We do not match UIKit's behavior for selection and editable content interaction.
Currently, it is not possible to create a selection when focus is on editable 
content.

I addressed this by matching UIKit's behavior:
When the selection is created, focus leaves the editable content. If focus is 
returned
to the editable content, then the selection is removed.

Tests: editing/selection/ios/select-text-by-long-press-with-focused-element.html
       
editing/selection/ios/select-text-by-long-press-with-hardware-keyboard.html
       editing/selection/ios/tap-focused-input-clears-outside-selection.html

* 
LayoutTests/editing/selection/ios/select-text-by-long-press-with-focused-element-expected.txt:
 Added.
* 
LayoutTests/editing/selection/ios/select-text-by-long-press-with-focused-element.html:
 Added.
* 
LayoutTests/editing/selection/ios/select-text-by-long-press-with-hardware-keyboard-expected.txt:
 Added.
* 
LayoutTests/editing/selection/ios/select-text-by-long-press-with-hardware-keyboard.html:
 Added.
* 
LayoutTests/editing/selection/ios/tap-focused-input-clears-outside-selection-expected.txt:
 Added.
* 
LayoutTests/editing/selection/ios/tap-focused-input-clears-outside-selection.html:
 Added.
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanUpInteraction]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView selectPositionAtPoint:completionHandler:]):
(-[WKContentView 
_selectPositionAtPoint:stayingWithinFocusedElement:completionHandler:]):
(-[WKContentView _hideKeyboard:]):
(-[WKContentView _elementDidBlur]):
(-[WKContentView _updateSelectionAssistantSuppressionState]):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to