Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
3.97k stars 606 forks source link

restoreRange is not the correct selection when leaving createLink modal inside a list #1384

Open MrCaumartin opened 1 year ago

MrCaumartin commented 1 year ago

Description

OS: Ubuntu 22.04.2 LTS Browser: Chrome v110.0.5481.177 Screen resolution: 1920x1080

How to reproduce?

  1. Try to add a list, a p or any content. image
  2. Create a link with some content and cancel. image
  3. Without reselecting, try to create a link. image

The selection is broken after step 3.

The saveRange inside the restoreRange function seems to contains the correct selection for this specific test.