prosemirror: Can't select an atom node in Chrome if it's the last in a line

Issue details

If we render a <span> as an atom node and it appears at the end of a line, selection doesn’t work.

Steps to reproduce

Go to https://unequaled-truthful-condition.glitch.me/, try to select from the right to left in the second line, or from left to right. The atom node won’t be selected.

Code is available at https://glitch.com/edit/#!/unequaled-truthful-condition

ProseMirror version

Latest version.

Affected platforms

Tested on Chrome, Firefox and Safari and it only happens on Chrome. Unfortunately Chrome is also the most popular browser so the user impact is pretty large.

  • Chrome
  • Firefox
  • Internet Explorer
  • Other

Screenshots / Screencast (Optional)

chrome-bad

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 20 (7 by maintainers)

Commits related to this issue

Most upvoted comments

I’m seeing this is still happening on Chrome, I have found that setting visibility: hidden; on the IMG -> with class name ProseMirror-separator fixes it but breaks on Safari(it breaks the cursor position when the user clicks the input, it goes always to start no matter the number of chars plus the last node, the selection works). Any thoughts about what could be done?

Great. I’ve released the changes as 1.19.2