1
0
Fork 0

DomField#getContainingRow handling of direct row reference

* src/ui/field/DomField.js (getContainingRow): Return self if DT or DD

Certain types of elements (e.g. statics) are compiled such that the direct
reference is the row itself.
master
Mike Gerwitz 2016-04-02 00:26:57 -04:00
parent c204a12c19
commit edbc45a79b
1 changed files with 8 additions and 1 deletions

View File

@ -222,9 +222,16 @@ module.exports = Class( 'DomField' )
},
// TODO: move me
// TODO: move me; too many odd exceptions; standardize
'protected getContainingRow': function()
{
var node_name = this._element.nodeName.toUpperCase();
if ( ( node_name === 'DT' ) || ( node_name === 'DD' ) )
{
return [ this._element ];
}
var dd = this.getParent( this._element, 'dd' ),
dt = ( dd ) ? this.getPrecedingSibling( dd, 'dt' ) : null;