Issue 1 in google-jstemplate: jsselect reorders, breaks expectations about form-order vs. doc-order fields

5 views
Skip to first unread message

codesite...@google.com

unread,
Sep 20, 2008, 5:02:01 PM9/20/08
to google-j...@googlegroups.com
Issue 1: jsselect reorders, breaks expectations about form-order vs.
doc-order fields
http://code.google.com/p/google-jstemplate/issues/detail?id=1

New issue report by corydodt:
What steps will reproduce the problem?
1. use a jsselect inside a <form>, on an <input>. The <input> should have
a constant 'name' attribute, such that document.formxx.field_name is an
array of fields with that name. (See attached html file.)
2. call jstProcess on the form, to duplicate that field several times.
3. compare document order and the order in the formxx.field_name array.

Expected: The two alerts should be the same, in my test page.

Actual: As RAtM (and Luke) said, "the last shall be first".


I'm using svn r9, FF3/Ubuntu8.04.


It is very common for apps to use document.formxx.field_name[n] where more
than one field has the same name 'field_name'. Referenced through
formxx.field_name, these fields are in order by how early they were created
(chronologically), *not* in document order. jsselect's use of
domInsertBefore shifts the order backwards 1 slot, placing the 0'th element
at the end of the form.name array.


Attachments:
bug.html 1.5 KB


Issue attributes:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply all
Reply to author
Forward
0 new messages