Skip to content

TinyMCE: Text behind bullet points in ordered/unordered lists gets deleted when converted into a link #4228

@nassabay

Description

@nassabay

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

  1. Go to 'Pages' (Events, Locations works as well)
  2. Open any page or create a new one
  3. In the description create either an ordered or unordered list and and type anything
  4. Select everything behind the number or bullet point (One word / multiple words)
  5. Click 'Insert'
  6. Select 'Link...'
  7. Type anything into the URL field or make an internal link by selecting another page
  8. 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):

Image
<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:

Image
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions