dijit.form.Textarea.postMixInProperties
dojo.require("dijit.form.Textarea");
defined in dijit/form/Textarea.js
Usage
function () (view source)
this.inherited(arguments); // don't let the source text be converted to a DOM structure since we just want raw text if(this.srcNodeRef && this.srcNodeRef.innerHTML != ""){ this.value = this.srcNodeRef.innerHTML; this.srcNodeRef.innerHTML = ""; } if((!this.value || this.value == "") && this.srcNodeRef && this.srcNodeRef.value){ this.value = this.srcNodeRef.value; } if(!this.value){ this.value = ""; } this.value = this.value.replace(/\r\n/g,"\n").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&"); if(dojo.isFF == 2){ // In the case of Firefox an iframe is used and when the text gets focus, // focus is fired from the document object. There isn't a way to put a // waiRole on the document object and as a result screen readers don't // announce the role. As a result screen reader users are lost. // // An additional problem is that the browser gives the document object a // very cryptic accessible name, e.g. // wysiwyg://13/http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_InlineEditBox.html // When focus is fired from the document object, the screen reader speaks // the accessible name. The cyptic accessile name is confusing. // // A workaround for both of these problems is to give the iframe's // document a title, the name of which is similar to a role name, i.e. // "edit area". This will be used as the accessible name which will replace // the cryptic name and will also convey the role information to the user. // Because it is read directly to the user, the string must be localized. // In addition, since a <label> element can not be associated with an iframe, if // this control has a label, insert the label text into the title as well. var _nlsResources = dojo.i18n.getLocalization("dijit", "Textarea"); this._iframeEditTitle = _nlsResources.iframeEditTitle; this._iframeFocusTitle = _nlsResources.iframeFocusTitle; var label=dojo.query('label[for="'+this.id+'"]'); if(label.length){ this._iframeEditTitle = label[0].innerHTML + " " + this._iframeEditTitle; } var body = this.focusNode = this.editNode = dojo.doc.createElement('BODY'); body.style.margin="0px"; body.style.padding="0px"; body.style.border="0px"; }