[richfaces-issues] [JBoss JIRA] (RF-13664) EDT firstChild call will return a text element when the source code is formatted to have one element per line
Brian Leathem (JIRA)
issues at jboss.org
Wed Jun 11 16:46:38 EDT 2014
[ https://issues.jboss.org/browse/RF-13664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12975472#comment-12975472 ]
Brian Leathem commented on RF-13664:
------------------------------------
An alternative solution:
{{element.firstChild}} is the same as {{element.childNodes\[0]}} and will return the problematic _text_ node. However {{element.children\[0]}} returns the expected child element. Since {{element.firstChild}} is used in multiple places in the _extendedDataTable.js_ source, replacing it's use by the {{element.children\[0]}} call is the least invasive solution.
> EDT firstChild call will return a text element when the source code is formatted to have one element per line
> -------------------------------------------------------------------------------------------------------------
>
> Key: RF-13664
> URL: https://issues.jboss.org/browse/RF-13664
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-tables
> Reporter: Brian Leathem
> Assignee: Brian Leathem
> Fix For: 4.5.0.Alpha3
>
> Original Estimate: 30 minutes
> Remaining Estimate: 30 minutes
>
> Formatting the generated html and viewing the result in chrome leads to an error in the EDT call:
> {{this.frozenHeaderPartElement.firstChild.rows}}. This is because when the element is followed by a newline, a text element is returned from the firstChild call.
> Some solutions to this are discussed in the stackoverflow question:
> http://stackoverflow.com/questions/2299807/element-firstchild-is-returning-textnode-instead-of-an-object-in-ff
> I recommend we use jQuery here to resolve the first child in a cross-browser way.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the richfaces-issues
mailing list