EasyUI Forum

General Category => Bug Report => Topic started by: mazvv on August 19, 2014, 10:00:28 AM



Title: Textbox value
Post by: mazvv on August 19, 2014, 10:00:28 AM
Textbox value initializers only onblur therefore it's not possible submit through Return keyboard button


Title: Re: Textbox value
Post by: jarry on August 19, 2014, 06:45:35 PM
By default, the textbox value is changed when the inputing box loses focus. You can change this behavior by override the $.fn.textbox.defaults.inputEvents configuration.
Code:
<script type="text/javascript">
$.extend($.fn.textbox.defaults.inputEvents, {
keyup: function(e){
var t = $(e.data.target);
t.textbox('setValue', t.textbox('getText'));
}
});
</script>