Bug 166897 - Do dot allow selection of editable content when not editing
Summary: Do dot allow selection of editable content when not editing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified iOS 10
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-10 11:17 PST by Enrica Casucci
Modified: 2017-01-12 16:38 PST (History)
0 users

See Also:


Attachments
Patch (3.45 KB, patch)
2017-01-10 11:27 PST, Enrica Casucci
no flags Details | Formatted Diff | Diff
Patch2 (6.75 KB, patch)
2017-01-12 16:27 PST, Enrica Casucci
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2017-01-10 11:17:41 PST
Long press/force press should not create a selection in editable content if we are not already editing.
We want to allow the selection in editable content (input elements, text areas or content editable) only after the user has focused the field and keyboard is on screen.

rdar://problem/29388806
Comment 1 Enrica Casucci 2017-01-10 11:27:55 PST
Created attachment 298491 [details]
Patch
Comment 2 Tim Horton 2017-01-10 14:13:34 PST
Comment on attachment 298491 [details]
Patch

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

> Source/WebKit2/ChangeLog:3
> +        Do dot allow selection of editable content when not editing.

s/dot/not/?

> Source/WebKit2/ChangeLog:11
> +        When retrieving the position information, we should not consider
> +        as candidates for selection editable elements, since this is only
> +        used for non editable selections.

Seems like this should be quite easy to test with some of the stuff that Megan has been hooking up, no?
Comment 3 Enrica Casucci 2017-01-10 14:17:57 PST
(In reply to comment #2)
> Comment on attachment 298491 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=298491&action=review
> 
> > Source/WebKit2/ChangeLog:3
> > +        Do dot allow selection of editable content when not editing.
> 
> s/dot/not/?
> 
> > Source/WebKit2/ChangeLog:11
> > +        When retrieving the position information, we should not consider
> > +        as candidates for selection editable elements, since this is only
> > +        used for non editable selections.
> 
> Seems like this should be quite easy to test with some of the stuff that
> Megan has been hooking up, no?

Yes, I'll write a test.
Comment 4 Enrica Casucci 2017-01-12 16:27:47 PST
Created attachment 298731 [details]
Patch2

Patch with test.
Comment 5 Tim Horton 2017-01-12 16:31:15 PST
Comment on attachment 298731 [details]
Patch2

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

> LayoutTests/fast/events/touch/ios/long-press-on-editable.html:21
> +        function getTapScript()

Nothing ever calls this function?

> LayoutTests/fast/events/touch/ios/long-press-on-editable.html:28
> +             })();`

This line is indented wrong, I think. One space too many?
Comment 6 Enrica Casucci 2017-01-12 16:33:20 PST
(In reply to comment #5)
> Comment on attachment 298731 [details]
> Patch2
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=298731&action=review
> 
> > LayoutTests/fast/events/touch/ios/long-press-on-editable.html:21
> > +        function getTapScript()
> 
> Nothing ever calls this function?
> 
> > LayoutTests/fast/events/touch/ios/long-press-on-editable.html:28
> > +             })();`
> 
> This line is indented wrong, I think. One space too many?

Copy paste :-( Will fix it.
Comment 7 Enrica Casucci 2017-01-12 16:38:18 PST
Committed revision 210687.