Force restore saved selections after inserting links into the editor
authorAlexander Ebert <ebert@woltlab.com>
Mon, 27 Jun 2022 16:53:37 +0000 (18:53 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 27 Jun 2022 16:53:37 +0000 (18:53 +0200)
commitdd829b643d403f403fae8748a8f00e2e448af490
tree972bbd102d7378b8fa59841120fd2d869f105066
parentfb4c335ad5eba1df3fdd21a5e8681a0c76be0b5b
Force restore saved selections after inserting links into the editor

Redactor‘s selection handling is very fragile and “forgetting” to restore the selection can cause some very strange side-effects.

The user will start typing inside a selection marker, which will not cause any visual effects, but the content will get lost once the editor removes the markers.

See https://www.woltlab.com/community/thread/296022-einf%C3%BCgen-von-links-im-editor-unter-ipados/
See https://www.woltlab.com/community/thread/296116-einf%C3%BCgen-von-links-im-editor-unter-ipados-text-verschwindet/
See https://www.woltlab.com/community/thread/294753-text-wird-beim-speichern-abgeschnitten/
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabLink.js