Closed Bug 504157 Opened 16 years ago Closed 15 years ago

IDs are replicated when editing <li> items in designMode

Categories

(Firefox :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: dav.glass, Unassigned)

References

()

Details

(Whiteboard: [CLOSEME 2011-1-1])

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 When <li> items that have ID attributes, using the editor to insert a new list item replicates the ID of the previous <li> item in the newly created item. This behavior occurs in Firefox 3.08 and Chrome. This does not occur with IE8 or Opera 9.6.1 This can be replicated by editing any HTML which has <li> items with an ID attribute. The following source selection illustrates what happens... Before Edit: <ul xmlns="http://www.w3.org/1999/xhtml" id="10" style="margin-top: 0in;"> <li id="11">Federal and state regulatory documents</li> <li id="12">Requirements documents</li> <li id="13">Design documents</li> <li id="14">Organizational policies</li> <li id="15">Standard operating procedures</li> </ul> After Adding one item.... <ul xmlns="http://www.w3.org/1999/xhtml" id="10" style="margin-top: 0in;"> <li id="11">Federal and state regulatory documents</li> <li id="12">Requirements documents</li> <li id="13">Design documents</li> <li id="14">Organizational policies</li> <li id="14">This is newly added<br></li> <li id="15">Standard operating procedures</li> </ul> Reproducible: Always Steps to Reproduce: Create an iframe with designMode on, then insert the HTML from the details. Hit enter to create a new bullet point. Now inspect the elements. The new item will assume the id of the previous item. Actual Results: The ids are duplicated. Expected Results: The new item should not have an id.
Reporter, are you still seeing this issue with Firefox 3.6.12 or later in safe mode? If not, please close. These links can help you in your testing. http://support.mozilla.com/kb/Safe+Mode http://support.mozilla.com/kb/Managing+profiles Also, please consider using the most recent Firefox 4 beta build, your bug may be resolved there.
Whiteboard: [CLOSEME 2011-1-1]
No reply, INCOMPLETE. Please retest with Firefox 3.6.13 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
Yes, this issue is still valid. In fact, it's more than just LI's. Any editable element with an ID that uses the "auto create on enter" feature carries the id from the previous. So, if you have a <P> with an ID, then hit enter to create a new one, the previous <P>'s ID will be carried to the new one. This leads to a very unstable DOM since you end up with several duplicate ID's in the DOM. Not looking at the code, it "appears" that the "auto-create" uses a standard DOM node.cloneNode() to create the new element. This is flawed since carries the ID across to the newly created Node.
You need to log in before you can comment on or make changes to this bug.