Bug 197686 - iOS: Selection is dismissed even if click is preventDefault()'d
Summary: iOS: Selection is dismissed even if click is preventDefault()'d
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-08 00:26 PDT by Tim Horton
Modified: 2019-05-08 16:44 PDT (History)
8 users (show)

See Also:


Attachments
Patch (11.41 KB, patch)
2019-05-08 00:26 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews126 for ios-simulator-wk2 (8.00 MB, application/zip)
2019-05-08 02:25 PDT, Build Bot
no flags Details
Patch (11.53 KB, patch)
2019-05-08 03:55 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews215 for win-future (13.53 MB, application/zip)
2019-05-08 04:49 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews122 for ios-simulator-wk2 (2.46 MB, application/zip)
2019-05-08 05:54 PDT, Build Bot
no flags Details
Patch (12.32 KB, patch)
2019-05-08 11:19 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (12.27 KB, patch)
2019-05-08 11:49 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (16.64 KB, patch)
2019-05-08 13:17 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (16.46 KB, patch)
2019-05-08 13:29 PDT, Tim Horton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2019-05-08 00:26:22 PDT
iOS: Selection is dismissed even if click is preventDefault()'d
Comment 1 Tim Horton 2019-05-08 00:26:54 PDT
Created attachment 369363 [details]
Patch
Comment 2 Tim Horton 2019-05-08 00:26:56 PDT
<rdar://problem/49398824>
Comment 3 Build Bot 2019-05-08 02:25:25 PDT
Comment on attachment 369363 [details]
Patch

Attachment 369363 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/12131254

New failing tests:
editing/pasteboard/smart-paste-paragraph-003.html
editing/deleting/smart-delete-paragraph-003.html
Comment 4 Build Bot 2019-05-08 02:25:27 PDT
Created attachment 369366 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.14.4
Comment 5 Tim Horton 2019-05-08 03:55:31 PDT
Created attachment 369371 [details]
Patch
Comment 6 Build Bot 2019-05-08 04:49:55 PDT
Comment on attachment 369371 [details]
Patch

Attachment 369371 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12132257

New failing tests:
svg/repaint/remove-border-property-on-root.html
Comment 7 Build Bot 2019-05-08 04:49:57 PDT
Created attachment 369374 [details]
Archive of layout-test-results from ews215 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews215  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 8 Build Bot 2019-05-08 05:54:23 PDT
Comment on attachment 369371 [details]
Patch

Attachment 369371 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/12132434

New failing tests:
editing/pasteboard/smart-paste-paragraph-003.html
editing/deleting/smart-delete-paragraph-003.html
Comment 9 Build Bot 2019-05-08 05:54:24 PDT
Created attachment 369380 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.14.4
Comment 10 Tim Horton 2019-05-08 11:19:21 PDT
Created attachment 369397 [details]
Patch
Comment 11 Wenson Hsieh 2019-05-08 11:33:34 PDT
Comment on attachment 369397 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369397&action=review

> LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler-expected.txt:3
> +This test verifies that the WebCore selection is not dismissed when tapping on an element that preventDefault()s the click event.

Nit - perhaps s/WebCore/DOM/?
Comment 12 Antoine Quint 2019-05-08 11:40:47 PDT
Comment on attachment 369397 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369397&action=review

> LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html:38
> +        document.addEventListener("selectionchange", didChangeSelection);

Maybe use { once: true } here to avoid the cleanup?
Comment 13 Tim Horton 2019-05-08 11:43:41 PDT
Comment on attachment 369397 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369397&action=review

>> LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler-expected.txt:3
>> +This test verifies that the WebCore selection is not dismissed when tapping on an element that preventDefault()s the click event.
> 
> Nit - perhaps s/WebCore/DOM/?

Sure

>> LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html:38
>> +        document.addEventListener("selectionchange", didChangeSelection);
> 
> Maybe use { once: true } here to avoid the cleanup?

😲
Comment 14 Tim Horton 2019-05-08 11:48:06 PDT
(In reply to Tim Horton from comment #13)
> Comment on attachment 369397 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=369397&action=review
> 
> >> LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler-expected.txt:3
> >> +This test verifies that the WebCore selection is not dismissed when tapping on an element that preventDefault()s the click event.
> > 
> > Nit - perhaps s/WebCore/DOM/?
> 
> Sure
> 
> >> LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html:38
> >> +        document.addEventListener("selectionchange", didChangeSelection);
> > 
> > Maybe use { once: true } here to avoid the cleanup?
> 
> 😲

Wait, no.
Comment 15 Tim Horton 2019-05-08 11:49:55 PDT
Created attachment 369401 [details]
Patch
Comment 16 Tim Horton 2019-05-08 13:17:11 PDT
Created attachment 369412 [details]
Patch
Comment 17 Tim Horton 2019-05-08 13:29:52 PDT
Created attachment 369415 [details]
Patch
Comment 18 WebKit Commit Bot 2019-05-08 13:50:29 PDT
Comment on attachment 369415 [details]
Patch

Clearing flags on attachment: 369415

Committed r245067: <https://trac.webkit.org/changeset/245067>
Comment 19 WebKit Commit Bot 2019-05-08 13:50:30 PDT
All reviewed patches have been landed.  Closing bug.
Comment 20 Tim Horton 2019-05-08 16:09:29 PDT
My rebaselines might not quite have been right. Will try again
Comment 21 Ryan Haddad 2019-05-08 16:44:41 PDT
(In reply to Tim Horton from comment #20)
> My rebaselines might not quite have been right. Will try again
For posterity, this was the second attempt: https://trac.webkit.org/changeset/245077/webkit