Ticket #2529157 (closed defect)

Reporter


Sam Hemelryk
Opened: 08/4/10
Last modified: 09/7/10
Status: closed
Type: defect
Resolution: fixed

Owner


Matt Sweeney
Target Release: 3.2.0
Priority: P3 (normal)
Summary: inDoc causes error in IE if used on form containing input with name=id
Description:

Hi guys,

There is an issue with inDoc when used on a form element containing an input with name="id".
I've attached an HTML file with code to illustrate the issue.

The snippet posted below resolves the issue for me, I'm sure there is a better way to do it but I'll leave that up to you (being the experts here).


Index: yui/3.1.1/build/dom/dom-debug.js
--- yui/3.1.1/build/dom/dom-debug.js Base (1.1)

+++ yui/3.1.1/build/dom/dom-debug.js Locally Modified (Based On 1.1)

@@ -225,7 +225,9 @@
node,
query;

- element.id = element.id || Y.guid();

+ if (!element.getAttribute('id')) {

+ element.setAttribute('id', Y.guid());

+ }


nodes = Y.DOM.allById(element.id, doc);
for (i = 0; node = nodes[i++];) { // check for a match

I've tested and confirmed the bug affects IE 6, 7, and 8.

Apologies if this is duplicate issue, had a quick search but didn't turn anything up.

Cheers
Sam

Type: defect Observed in Version: 3.1.1
Component: Dom Severity: S3 (normal)
Assigned To: Matt Sweeney Target Release: 3.2.0
Location: Priority: P3 (normal)
Tags: Relates To:
Browsers: IE - All
URL:
Test Information:

Attachments

Attachment #1: test.html (download)

Change History

Matt Sweeney

YUI Developer

Posted: 08/9/10
  • milestone changed to 3.2.0
  • priority changed to P3 (normal)
  • status changed from new to accepted

Matt Sweeney

YUI Developer

Posted: 08/9/10
  • status changed from accepted to checkedin

George

YUI Developer

Posted: 09/7/10
  • resolution changed to fixed

George

YUI Developer

Posted: 09/7/10
  • status changed from checkedin to closed