[Webkit-unassigned] [Bug 186347] New: Empty selection with readonly contenteditable element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 6 05:50:00 PDT 2018


            Bug ID: 186347
           Summary: Empty selection with readonly contenteditable element
           Product: WebKit
           Version: Safari 11
          Hardware: iPhone / iPad
                OS: iOS 11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: j.bogdanski at cksource.com
                CC: wenson_hsieh at apple.com


we struggle with an issue with document.getSelection() function when selected text is inside element with contenteditable=false attribute. Returned selection doesn't contain information about selected text. As a result, you cannot, for example, copy current selection using document.execCommand('copy') function.

Steps to reproduce:

1. Visit https://codepen.io/jacekbogdanski/pen/wXMORq using iPad.
2. Use Safari developer tools with iPad.
3. Select some text from Lorem Ipsum example using iPad.
4. Click `Execute` link.


Selection object should contain information about currently selected text.


Selection object doesn't contain information about current selection.


It seems like this issue occurs only with contenteditable elements. It works fine with simple div element or contenteditable=true.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180606/c2c17012/attachment.html>

More information about the webkit-unassigned mailing list