Closed Bug 986913 Opened 10 years ago Closed 10 years ago

setAttributeNS results in wrong outerHTML

Categories

(Core :: DOM: Core & HTML, defect)

28 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: t.motylewski, Assigned: longsonr)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36

Steps to reproduce:

Using Firefox 28 on Ubuntu 13.10.
after adding attribute to the element the "outerHTML" returns invalid html 
You can reproduce it with JS.
HTML:

<span id="spanid">Lorem Ipsum </span>

JS
var element = document.getElementById('spanid'); 
console.log(element.outerHTML); 
element.setAttributeNS('ext', 'qtip', 'attributeValue');
console.log(element.outerHTML);



Actual results:

the first console.log returns:
<span id="spanid">Lorem Ipsum</span> 
and it is correct
The second call returns
<spanqtip="attributeValue" id="spanid">Lorem Ipsum</span>
^^ notice missing space between span and qtip.


Expected results:

Attribute should be visible, and there should be space between span and atribute name.
Because of this bug I had some selenium tests failing on Firefox and working in chrome.
Summary: setAttributeNS result sin wrong outerHTML → setAttributeNS results in wrong outerHTML
Attached patch bug986913.txtSplinter Review
Assignee: nobody → longsonr
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #8395463 - Flags: review?(bugs)
Blocks: 744830
Attachment #8395463 - Flags: review?(bugs) → review+
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
https://hg.mozilla.org/mozilla-central/rev/af1d9bca7c9c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: