EasyUI Forum
March 28, 2024, 02:26:49 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Red underline on datagrid text input or textbox (when grammar is error)  (Read 6145 times)
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« on: December 26, 2016, 11:06:25 PM »

I see there are red underline in grammar error text on easyui textbox or textarea (on datagrid too), like this


I try to mod the easyui.min.js and adding
Code:
spellcheck=\"false\"
like code below
Code:
init:function(_7bf,_7c0){
var _7c1=$("<input type=\"text\" spellcheck=\"false\" class=\"datagrid-editable-input\">").appendTo(_7bf);
if(_7c1[name]&&name!="text"){
return _7c1[name](_7c0);
}else{
return _7c1;
}
}

it works but do you want consider to add this as easyui builtin optional in the future?

Thank you in advance
Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 28, 2016, 04:31:51 AM »

To disable all the 'spellcheck', just override the 'initValue' method.
Code:
<script type="text/javascript">
(function($){
var initValue = $.fn.textbox.methods.initValue;
$.extend($.fn.textbox.methods, {
initValue: function(jq, value){
return jq.each(function(){
initValue($(this), value);
$(this).textbox('textbox').attr('spellcheck', 'false');
});
}
})
})(jQuery);
</script>

You also can disable the 'spellcheck' on the <form>.
Code:
<form spellcheck="false">
...
</form>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!