So I've developed a dynamic inline editor that allows you to select a data type in one cell and this causes the editor for another cell to dynamically change to an appropriate cell editor e.g. TextBoxEditor. See the image below the value columns editor will change.
This works on every OS and browser combination except Chrome on Windows. When I change the editor using the following ...
column.editor = new YAHOO.widget.TextboxCellEditor({disableBtns:true});
It wont change in Chrome on Windows. It does work however if I change the the Editor to a YAHOO.widget.RadioCellEditor.
My full code snippet for reference.
var target = YAHOO.util.Event.getTarget(ev);
var column = myDataTable.getColumn(target);
var record = myDataTable.getRecord(target);
var editable = record.getData("mapEditable");
var configType = "null";
if (column.key == "mapDelete") {
if (configType == "default") {
return;
}
if (editable == "EditAll") {
myDataTable.deleteRow(target);
var len = myDataTable.getRecordSet().getLength();
if (len == 0) {
myDataTable.addRow( {mapDataType:"Text", mapKey:" ", mapValue:" ", mapDelete:" ", mapEditable:"EditAll"} );
}
parent.enableOkBtnFromIframe(configType);
}
}
if (column.key == "mapValue") {
record.setData("mapStartValidation","true");
var dataType = record.getData("mapDataType");
switch(dataType) {
case "Text":
case "Integer":
case "Float":
column.editor = new YAHOO.widget.TextboxCellEditor({disableBtns:true});
break;
case "Boolean":
column.editor = new YAHOO.widget.RadioCellEditor({radioOptions:["true","false"],disableBtns:true});
break;
default:
break;
}
myDataTable.showCellEditor(target);
Image - not able to edit cell in windows chrome..
I am never able to edit the cell in Windows Chrome when I change the CellEditor to a TextBoxEditor
Any ideas folks?
Ok so I figured this out.
Other events were firing on an other event handler. I added a call to stop the event bubbling in my other event handler.
YAHOO.util.Event.stop(args[0]);