The reason is that Ext is defining all of the divs that contain the data with an extra 'unselectable=on' field. To fix this, I followed this post and everything seems to work. I've tested this on both Firefox 2.0 and IE6.
< IE fix, using JavaScript >
/**
* http://extjs.com/forum/showthread.php?t=22218
* For non-IE browsers, this is fixed with a CSS addition.
* @param {Ext.grid.GridPanel} grid The GridPanel to fix.
*/
var reenableTextSelection = function(grid){
if(Ext.isIE){
grid.store.on("load", function(){
var elems=Ext.DomQuery.select("div[unselectable=on]", grid.dom);
for(var i=0, len=elems.length; i<len; i++){
elems[i].unselectable = "off";
}
});
}
};
< CSS fix for Firefox and Safari >
.x-grid3-row td,
.x-grid3-summary-row td,
.x-grid3-cell-text,
.x-grid3-hd-text,
.x-grid3-hd,
.x-grid3-row {
-moz-user-select:inherit;
-khtml-user-select:text;
}
Make sure that your CSS stylesheet is loaded after the Ext stylesheet is loaded. Otherwise these overrides for Firefox and Safari won't be accessed.
2 comments:
Here's a comment.
Here's another comment.
Post a Comment