User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20070725 Firefox/188.8.131.52 Build Identifier: 2007-08-09-03-mozilla1.8 In some cases, when you add an attribute to an element, other expressions (such as for form controls) that reference the attribute are not updated. Reproducible: Always
Created attachment 278601 [details] Test form demonstrating the bug When you activate the edit button next to an email address, the corresponding `person` element is marked for editing with an `s:selected` attribute; the edit group should refer to the "selected" `person` element, but it does not rebind to the newly selected `person` element. (Note that I am using XForms Buddy to verify that the attributes are actually being placed on the correct `person` element.) Also, note that the `xf:output` that counts the number of `s:selected` attributes is also not updated, and finally that the "Unselect all" button does not delete the `s:selected` attributes that are added using the edit button.
The namespace of an attribute was not considered when inserting an attribute so the actual name of the attribute that was inserted was 's:selected'. XPath however, recognizes s:selected as a namespace prefix + local name and did not match a node with an attribute whose local name was s:selected.
Created attachment 278689 [details] [diff] [review] patch Take into account namespaces when checking for duplicate attributes and inserting a new attribute.
Comment on attachment 278689 [details] [diff] [review] patch Not sure if XForms patches need approval while in M8 freeze. XForms is not part of the build.
Comment on attachment 278689 [details] [diff] [review] patch According to mozilla.dev.planning, this doesn't need approval
checked into 1.8 branch via bug 410239.