Title: [218812] trunk/Source/WebKit2
- Revision
- 218812
- Author
- [email protected]
- Date
- 2017-06-26 10:54:38 -0700 (Mon, 26 Jun 2017)
Log Message
[iOS DnD] [WK2] Beginning a drag session should prevent clicking via long press
https://bugs.webkit.org/show_bug.cgi?id=173838
Reviewed by Tim Horton.
After r218579, WebKit no longer attempts to replace out-of-the-box UIKit long-press/drag lift disambiguation by
firing events immediately. However, this means that dragging will defer the highlight long press gesture
recognizer until dragging ends rather than cancel it immediately, which causes WKContentView to dispatch a
synthetic click immediately upon lift. To fix this, we should bail out of the highlight long press gesture when
beginning a drag.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (218811 => 218812)
--- trunk/Source/WebKit2/ChangeLog 2017-06-26 17:52:46 UTC (rev 218811)
+++ trunk/Source/WebKit2/ChangeLog 2017-06-26 17:54:38 UTC (rev 218812)
@@ -1,3 +1,19 @@
+2017-06-26 Wenson Hsieh <[email protected]>
+
+ [iOS DnD] [WK2] Beginning a drag session should prevent clicking via long press
+ https://bugs.webkit.org/show_bug.cgi?id=173838
+
+ Reviewed by Tim Horton.
+
+ After r218579, WebKit no longer attempts to replace out-of-the-box UIKit long-press/drag lift disambiguation by
+ firing events immediately. However, this means that dragging will defer the highlight long press gesture
+ recognizer until dragging ends rather than cancel it immediately, which causes WKContentView to dispatch a
+ synthetic click immediately upon lift. To fix this, we should bail out of the highlight long press gesture when
+ beginning a drag.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView _dragInteraction:prepareForSession:completion:]):
+
2017-06-26 Konstantin Tokarev <[email protected]>
Unreviewed, add missing header icncludes
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (218811 => 218812)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-06-26 17:52:46 UTC (rev 218811)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-06-26 17:54:38 UTC (rev 218812)
@@ -4514,6 +4514,8 @@
- (void)_dragInteraction:(UIDragInteraction *)interaction prepareForSession:(id <UIDragSession>)session completion:(dispatch_block_t)completion
{
+ [self _cancelLongPressGestureRecognizer];
+
RELEASE_LOG(DragAndDrop, "Preparing for drag session: %p", session);
if (self.currentDragOrDropSession) {
// FIXME: Support multiple simultaneous drag sessions in the future.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes