Opened 7 years ago

Last modified 7 years ago

#9023 confirmed Bug

Removing list formatting strips the id from the contents within the removed list

Reported by: mgrove Owned by:
Priority: Normal Milestone:
Component: Core : Lists Version: 3.0
Keywords: Cc:

Description

Steps to Reproduce

  1. Paste the following into "Source" view:
    <p id="TEST" class="headerInfo">Text</p>
    
  2. Leave Source view and highlight "text".
  3. Click the "Insert/Remove Bulleted List" button to apply the ul/li formatting
  4. Click the "Insert/Remove Bulleted List" button again to remove the ul/li
  5. Review "Source" view of html

Expected Result

<p id="TEST" class="headerInfo">Text</p>

Actual Result

<p class="headerInfo">Text</p>

Change History (4)

comment:1 Changed 7 years ago by Frederico Caldeira Knabben

Keywords: Discussion added

I don't think that preserving the id attribute here is necessary and not even correct.

All transformations remove the id attribute, because in fact that attribute was pointing to an element that is not any more available, being it replaced by a different one. This means that transferring the id would be semantically wrong.

Note that step "4" is not undoing the list creation (step "3"), but is instead transforming the list in paragraph.

comment:2 Changed 7 years ago by mgrove

Thanks for the initial assessment fredck. The problem I'm running into is that the conversion from the p tag to the li tag preserves the id attribute, whereas the conversion from the li tag to the p tag does not. This seems a little inconsistent to me as I need to know what expectation to set for our users.

comment:3 Changed 7 years ago by Frederico Caldeira Knabben

Keywords: Discussion removed
Status: newconfirmed

Put in that way, there is in fact little to discuss about it. We must be consistent and I believe that keeping id on p->li was intentional.

comment:4 Changed 7 years ago by Wiktor Walc

Version: 3.6.33.0

The id attribute was stripped also in 3.0, so I'm setting the version number that isn't suggesting a recent regression.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy