Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#8844 closed defect (fixed)

[PATCH][CCLA] Grid incorrectly closes <th> cells when creating header.

Reported by: Jared Jurkiewicz Owned by: Bryan Forbes
Priority: high Milestone: 1.3
Component: DojoX Grid Version: 1.3.0b2
Keywords: Cc:
Blocked By: Blocking:

Description

Grid incorrectly closes <th> cells when creating header.

I was actually investigating another bug when I uncovered this one.

In dojox/grid/_Builder.js:

Function: generateCellMarkup:

At the start of the function, you have the following check:

if(isHeader){

var sortInfo = inCell.index != inCell.grid.getSortIndex() ? "" : inCell.grid.sortInfo > 0 ? 'aria-sort="ascending"' : 'aria-sort="descending"'; html = ['<th tabIndex="-1" role="', waiPrefix, 'columnheader"', sortInfo];

}else{

html = ['<td tabIndex="-1" role="', waiPrefix, 'gridcell"'];

}

And later when you close it you just do:

result.push('</td>'); return result; Array

That's incorrect markup, and it in fact shows up in the IE DOM as wrong when using the DOM explorer.

It should be:

if(isHeader){

result.push('</th>');

}else{

result.push('</td>');

}

Attachments (1)

headerClosure.patch (406 bytes) - added by Jared Jurkiewicz 11 years ago.
Patch for header closure problem.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by Jared Jurkiewicz

Attachment: headerClosure.patch added

Patch for header closure problem.

comment:1 Changed 11 years ago by Jared Jurkiewicz

Summary: Grid incorrectly closes <th> cells when creating header.[PATCH][CCLA] Grid incorrectly closes <th> cells when creating header.

comment:2 Changed 11 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [16983]) Fixing header closure. \!strict fixes #8844

comment:3 Changed 11 years ago by Adam Peller

Milestone: tbd1.3

comment:4 Changed 11 years ago by Jared Jurkiewicz

(In [16984]) Fixing header closure in less code. \!strict fixes #8844

Note: See TracTickets for help on using tickets.