PDA

View Full Version : [DEFER-1373] HtmlEditor & IE - cannot right-click and copy selected text



Burke
29 Oct 2010, 8:01 AM
It seems that in IE, if you select some text in the HtmlEditor and right-click to copy it, you don't get the right context menu (you get the same context menu as if you right clicked on some non-text part of the document). IE seems to be the only affected browser. In all other major browsers, you can select text and the right-click to copy it.

You can see an example of this by looking at the dynamic forms example page: http://dev.sencha.com/deploy/dev/examples/form/dynamic.html.

meroy
3 Nov 2010, 9:59 PM
Thanks for the report. This has been deferred for 4.x.

Burke
8 Nov 2010, 3:46 PM
Any chance this could get fixed sooner, in the earlier versions? This is a huge blocking issue for us that will prevent us from rolling this component out across our app.

garston
9 Nov 2010, 9:46 AM
Here's a fix for this issue:

Set autoMonitorDesignMode to false for IE

autoMonitorDesignMode : Ext.isIE ? false : true

and use doc.body.contentEditable for IE instead of doc.designMode in initFrame()

initFrame : function(){
this.doc = this.getDoc();
this.win = this.getWin();

this.doc.open();
this.doc.write(this.getDocMarkup());
this.doc.close();

var task = {
run : function(){
if(this.doc.body || this.doc.readyState == 'complete'){
Ext.TaskMgr.stop(task);
if(Ext.isIE){
this.doc.body.contentEditable = true;
}else{
this.doc.designMode="on";
}
this.initEditor.defer(10, this);
}
},
interval : 10,
duration:10000,
scope: this
};
Ext.TaskMgr.start(task);
}