[Webkit-unassigned] [Bug 245269] New: setBaseAndExtent not setting focus as requested

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 16 01:36:29 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=245269

            Bug ID: 245269
           Summary: setBaseAndExtent not setting focus as requested
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jamie at birch-family.me.uk
                CC: brian at birchill.co.jp, gsnedders at apple.com,
                    wenson_hsieh at apple.com

Created attachment 462386

  --> https://bugs.webkit.org/attachment.cgi?id=462386&action=review

HTML file reproducing the issue.

STR:

1: Open attachment: setbaseandextent_not_setting_focus_as_requested_repro.html

2. Click the "Generate selection" button.

Expected results:
On-screen logger should report the resulting selection, which reflects the focusNode and focusOffset passed as parameters in the call to Selection.setBaseTextAndExtent():

{
    "focusNode": "#text:Text outside:",
    "focusOffset": 13,
    "anchorNode": "#text:_",
    "anchorOffset": 1
}

Actual results:
On-screen logger reports a different focusNode and focusOffset (the start of the text node from the neighbouring element):
{
    "focusNode": "#text:_",
    "focusOffset": 0,
    "anchorNode": "#text:_",
    "anchorOffset": 1
}

Firefox and Chrome produce the expected results.

-- 
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/20220916/006edf16/attachment.htm>


More information about the webkit-unassigned mailing list