-
Notifications
You must be signed in to change notification settings - Fork 48
TinyMCE: Text behind bullet points in ordered/unordered lists gets deleted when converted into a link #4228
Description
Describe the Bug
In TinyMCE: Text in ordered or unordered lists gets deleted when it is converted to a link (internal or external).
If the text is formatted, e.g. bold, italic, marked as do-not-translate it doesn't get deleted. Only unformatted text behind a list bullet point / number gets deleted.
See additional info section for examples of what works and what doesn't work.
Steps to Reproduce
- Go to 'Pages' (Events, Locations works as well)
- Open any page or create a new one
- In the description create either an ordered or unordered list and and type anything
- Select everything behind the number or bullet point (One word / multiple words)
- Click 'Insert'
- Select 'Link...'
- Type anything into the URL field or make an internal link by selecting another page
- Click 'Save'
Expected Behavior
The selected text is converted into a Link and doesn't get deleted.
Text is formatted to a link no matter what kind of formatting is applied to it.
Actual Behavior
The selected text and bullet point of the list are fully deleted
Screenshot
N/A
Additional Information
here is a video showing the bug: https://chat.tuerantuer.org/digitalfabrik/pl/mke5o35si7g7dxcttni7p5hbkw
Examples of what gets deleted and what doesn't assuming the whole sentence is selected to be converted into a link (everything behind a bullet point):
<li>This will get deleted when made into a link, because no other formatting</li>
<li><strong>This will not get deleted when made into a link (because its bold)</strong></li>
<li><span class="notranslate" dir="ltr" translate="no">This will not get deleted (because its DNT)</span></li>
</ul>
<ol>
<li>This will get deleted when made into a link, because no other formatting</li>
<li><strong>This will not get deleted when made into a link (because its bold)</strong></li>
<li><span class="notranslate" dir="ltr" translate="no">This will not get deleted (because its DNT)</span></li>
</ol>
Works correctly - Making only parts of text a link:
Traceback
Related Issues
Summary of discussion and updates to the description
- Added more context and conditions that have to be met to encounter this bug