if(dojo.isIE || dojo.isSafari || dojo.isOpera){ if(dojo.isIE){ this.editNode.unselectable = "on"; } // prevent IE from setting focus this.editNode.contentEditable = !disabled; if(dojo.isIE){ var _this = this; setTimeout(function(){ _this.editNode.unselectable = "off"; }, 0); } }else{ //moz if(disabled){ //AP: why isn't this set in the constructor, or put in mozSettingProps as a hash? this._mozSettings=[false,this.blockNodeForEnter==='BR']; } this.document.designMode=(disabled?'off':'on'); if(!disabled && this._mozSettings){ dojo.forEach(this._mozSettingProps, function(s,i){ this.document.execCommand(s,false,this._mozSettings[i]); },this); } // this.document.execCommand('contentReadOnly', false, disabled); // if(disabled){ // this.blur(); //to remove the blinking caret // } } this.disabled = disabled;