Undoing the insertion of a new attribute doesn't work

RESOLVED FIXED

Status

Other Applications
DOM Inspector
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: WeirdAl, Assigned: WeirdAl)

Tracking

({regression, testcase})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

1.01 KB, patch
neil@parkwaycc.co.uk
: review+
neil@parkwaycc.co.uk
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

12 years ago
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...

(Assignee)

Comment 3

12 years ago
There's a typo in the undoCommand call.  It should be this.attr.namespaceURI.
(Assignee)

Comment 4

12 years ago
Created attachment 250916 [details] [diff] [review]
patch

one-line fix for a typo
Assignee: dom-inspector → ajvincent
Status: NEW → ASSIGNED
Attachment #250916 - Flags: superreview?(neil)
Attachment #250916 - Flags: review?(neil)

Updated

12 years ago
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
Last Resolved: 12 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.