Opened 10 years ago

Closed 7 years ago

#11136 closed defect (patchwelcome)

Checkstate in checkbox doesn't reflect the cells value after browser backward/forward

Reported by: todelod Owned by: Bryan Forbes
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.4.2
Keywords: chrome, datagrid, checkbox, AlwaysEdit, autocomplete="off" Cc:
Blocked By: Blocking:

Description

In Chrome 4 and 5 the problems are easy to recreate. I had the same problems in firefox also but an explicit reload solved that.

The solution seems to be that autocomplete="off" needs to be set.

CURRENT CODE: dojo.declare("dojox.grid.cells.Bool", dgc.AlwaysEdit?, {

summary: grid cell that provides a standard checkbox that is always on for editing _valueProp: "checked", formatEditing: function(inDatum, inRowIndex){

return '<input class="dojoxGridInput" type="checkbox"' + (inDatum ? ' checked="checked"' : ) + ' style="width: auto" />';

}, doclick: function(e){

if(e.target.tagName == 'INPUT'){

this.applyStaticValue(e.rowIndex);

}

} }); HOW IT PROBABLY NEEDS TO BE:

dojo.declare("dojox.grid.cells.Bool", dgc.AlwaysEdit?, {

summary: grid cell that provides a standard checkbox that is always on for editing _valueProp: "checked", formatEditing: function(inDatum, inRowIndex){

return '<input class="dojoxGridInput" autocomplete="off" type="checkbox"' + (inDatum ? ' checked="checked"' : ) + ' style="width: auto" />';

}, doclick: function(e){

if(e.target.tagName == 'INPUT'){

this.applyStaticValue(e.rowIndex);

}

} });

I'm still quite new to dojo and the internal rendering in browsers but I would suspect that this is a general issue with widgets that has AlwaysEdit?. I can see that the attribute autocomplete="off" is present on multiple places and it seems that it is needed on even more.

Change History (3)

comment:1 Changed 9 years ago by bill

Owner: changed from bryanforbes to Bryan Forbes

comment:2 Changed 7 years ago by bill

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

We will consider patches to the old DojoX Grid code though.

comment:3 Changed 7 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.