[Webkit-unassigned] [Bug 244976] Textarea selection does not return the caret position on focus event

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 11 13:57:57 PDT 2022


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

--- Comment #2 from Alexey Proskuryakov <ap at webkit.org> ---
In my testing, Chrome passes?

I think that there are two aspects here:

1. Why are we even removing the focus from textarea when clicking on the button? Seems related to bug 22261.

2. When the focus returns, the selection is restored too late. Compare to this test case:

  textarea.addEventListener('focus', function (e) {
    console.log(textarea.selectionStart); // 0
    setTimeout(()=>{console.log(textarea.selectionStart)}, 0); // correct offset
  });

-- 
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/20220911/e299f0b2/attachment.htm>


More information about the webkit-unassigned mailing list