Closed Bug 366287 Opened 19 years ago Closed 19 years ago

Undoing the insertion of a new attribute doesn't work

Categories

(Other Applications :: DOM Inspector, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: WeirdAl, Assigned: WeirdAl)

References

Details

(Keywords: regression, testcase)

Attachments

(1 file)

Steps to reproduce: (1) Open http://www.mozilla.org/projects/firefox/3.0a2pre/whatsnew/ in DOM Inspector. (2) Left hand panel DOM tree, go to the root element, add a foo="bar" attribute. (3) Edit menu > Undo (4) Switch to the doctype node in the left hand panel to be sure the right hand panel updates. (5) Switch to the root element in the left hand panel. Expected results: Right-hand panel does not show a foo attribute. Actual results: Right hand panel shows a foo="bar" attribute. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/0000000000 Minefield/3.0a2pre build dated 20050105.
Hrm...this was one of the testcases I was using with Bug 205872, but that is the most likely candidate to cause this regression :( I'll see if I can't figure this one out tonight
(In reply to comment #0) Well, this is strange. This is what removes the attribute: http://mxr-test.landfill.bugzilla.org/mxr-test/seamonkey/source/extensions/inspector/resources/content/viewers/domNode/domNode.js#406 That line *is* being called, and this.attr.namespaceURI == null, like it should be, and this.attr.localName == "foo", like we'd expect it to be. I was thinking that maybe that panel just wasn't getting updated, I copied the XML of the HTML element, and the attribute was there still. I am a bit perplexed as to what may have caused this...
There's a typo in the undoCommand call. It should be this.attr.namespaceURI.
Attached patch patchSplinter Review
one-line fix for a typo
Assignee: dom-inspector → ajvincent
Status: NEW → ASSIGNED
Attachment #250916 - Flags: superreview?(neil)
Attachment #250916 - Flags: review?(neil)
Attachment #250916 - Flags: superreview?(neil)
Attachment #250916 - Flags: superreview+
Attachment #250916 - Flags: review?(neil)
Attachment #250916 - Flags: review+
Checking in extensions/inspector/resources/content/viewers/domNode/domNode.js; /cvsroot/mozilla/extensions/inspector/resources/content/viewers/domNode/domNode.js,v <-- domNode.js new revision: 1.25; previous revision: 1.24 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: