Title: [230588] trunk/Source/WebKit
Revision
230588
Author
[email protected]
Date
2018-04-12 11:50:33 -0700 (Thu, 12 Apr 2018)

Log Message

Don't have selections get stuck in editable elements
https://bugs.webkit.org/show_bug.cgi?id=184483

Reviewed by Timothy Hatcher.

When selecting in editable elements, if the keyboard does not come up, which is not required,
then the selections are stuck in that element. If you try and select something in web content,
it will only select in the editable element. By clearing the assisted node when clearing a selection,
it no longer sticks. Also, textSelectionAssistant should not be used as if we are currently editing.
Change it to the function we created for that purpose in a pervious patch.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView clearSelection]):
(-[WKContentView _isInteractingWithAssistedNode]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (230587 => 230588)


--- trunk/Source/WebKit/ChangeLog	2018-04-12 18:35:17 UTC (rev 230587)
+++ trunk/Source/WebKit/ChangeLog	2018-04-12 18:50:33 UTC (rev 230588)
@@ -1,3 +1,20 @@
+2018-04-12  Megan Gardner  <[email protected]>
+
+        Don't have selections get stuck in editable elements
+        https://bugs.webkit.org/show_bug.cgi?id=184483
+
+        Reviewed by Timothy Hatcher.
+        
+        When selecting in editable elements, if the keyboard does not come up, which is not required,
+        then the selections are stuck in that element. If you try and select something in web content,
+        it will only select in the editable element. By clearing the assisted node when clearing a selection,
+        it no longer sticks. Also, textSelectionAssistant should not be used as if we are currently editing. 
+        Change it to the function we created for that purpose in a pervious patch.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView clearSelection]):
+        (-[WKContentView _isInteractingWithAssistedNode]):
+
 2018-04-12  Michael Catanzaro  <[email protected]>
 
         [WPE] Move libWPEWebInspectorResources.so to pkglibdir

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (230587 => 230588)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-04-12 18:35:17 UTC (rev 230587)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-04-12 18:50:33 UTC (rev 230588)
@@ -1917,6 +1917,7 @@
 
 - (void)clearSelection
 {
+    [self _stopAssistingNode];
     _page->clearSelection();
 }
 
@@ -2719,7 +2720,7 @@
 
 - (BOOL)_isInteractingWithAssistedNode
 {
-    return _textSelectionAssistant != nil;
+    return hasAssistedNode(_assistedNodeInformation);
 }
 
 - (void)changeSelectionWithGestureAt:(CGPoint)point withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)state
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to