Double click selection not working on adjacent spans

Issue #3344 wontfix
Simão Nunes created an issue

⚠ Problem
I’ve found that when using adjacent content editable spans with specific tags and, without spaces in between, will cause the double click selection to have a faulty behaviour.


🗒 Examples

Scenario 1 - This first scenario will not have any issues since the spans are separated by new lines:

<div>
<span contenteditable="true" spellcheck="false">SpanNumber1</span>
<span contenteditable="true" spellcheck="false">SpanNumber2</span>
<span contenteditable="true" spellcheck="false">SpanNumber3</span>
</div>

Scenario 2 - By structuring the HTML in this way, you will be able to replicate the problem:

<div>
<span contenteditable="true" spellcheck="false">SpanNumber1</span><span contenteditable="true" spellcheck="false">SpanNumber2</span><span contenteditable="true" spellcheck="false">SpanNumber3</span>
</div>

Scenario 3 - In some browsers instances, this structure will have an unexpected behaviour as well:

<div>
<span contenteditable="true">SpanNumber1</span><span contenteditable="true">SpanNumber2</span><span contenteditable="true">SpanNumber3</span>
</div>

🖇 Attachments
To demonstrate this behaviour, a JS fiddle was created with the faulty structure mentioned above for testing purposes.
The following GIF also provides an insight on where the problem is appearing.

Comments (3)

  1. Marshall Greenblatt

    What OS and CEF version? How does it behave in the cefclient sample app and Google Chrome at the same version?

  2. Simão Nunes reporter

    The issue was replicated with the following versions:

    OS: MacOS 12.1
    CEF Version: 91.1.6+g8a752eb+chromium-91.0.4472.77
    Google Chrome Version: 102.0.5005.115 (Official Build) (x86_64)

  3. Log in to comment