question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clicking on a zero-width node and dragging does not select text

See original GitHub issue

What’s the current behavior?

Clicking on an empty paragraph or next to a inline link (both have data-slate-zero-width nodes) and then dragging to select text only moves the cursor and does not select text.

slate_bug

What’s the expected behavior?

I should be able to click and drag anywhere on the document to select text.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
knubiecommented, Apr 18, 2020

Seems like this was fixed at some point, but the bug is back in 5.x and reproducible on all of the demos.

1reaction
zhujinxuancommented, Aug 24, 2018

@ianstormtaylor I think you are right. I commented out the updateSelection and then the problem does not happen.

I will have a look at updateSelection

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selection and Range - The Modern JavaScript Tutorial
JavaScript can access an existing selection, select/deselect DOM ... If node is a text node, then offset must be the position in its...
Read more >
Resize a div on border drag and drop without adding extra ...
It is certainly possible to do this without an extra div. Use css and ::after to create the border and change the cursor....
Read more >
Zero-Width Space - CSS-Tricks
The name zero-width space is antithetical, but it's not without uses. In text, maybe you'd use it around slashes because you want to...
Read more >
Options, Text Editor, General - Visual Studio - Microsoft Learn
Drag and drop text editing · Select subword on double click · Cut or Copy the current line without selection · Automatic delimiter...
Read more >
Basic Editing in Visual Studio Code
Learn about the basic editing features of Visual Studio Code. Search, multiple selection, code formatting.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found