PDA

View Full Version : Ext.form.TextArea: how to disable spellcheck?



smalafeev
30 Jan 2014, 3:35 AM
How to disable spellcheck in TextArea?
Tried this one but no luck:


Ext.create('Ext.form.TextArea', {
xtype: 'textarea',
autoCreate: {
spellcheck: false
}
});

palakurthivishal
30 Jan 2014, 5:07 AM
Hello smalafeev,
I guess I didn't achieve it in a semantic way but try this snippet, hope this works in your case.

Ext.create('Ext.form.FormPanel', {
title : 'Sample TextArea',
width : 400,
bodyPadding: 10,
renderTo : Ext.getBody(),
items: [{
xtype : 'textareafield',
grow : true,
name : 'message',
id : 'test',
fieldLabel: 'Message',
anchor : '100%',
listeners : {
afterrender : function(cmp){
var id = cmp.getId();
var elt = document.getElementById(id);
elt.setAttribute('spellcheck', false);
debugger;
}
}
}]

});