EasyUI Forum

General Category => Bug Report => Topic started by: crzdot on March 20, 2015, 06:50:15 PM



Title: a bug occurred when closing messager
Post by: crzdot on March 20, 2015, 06:50:15 PM
Code:
// I open a progress messager by 
$.messager.progress();

// and close it by
$.messager.progress('close');

error got in console:
Uncaught TypeError: Cannot read property 'onClose' of undefined

I fixed it by making below changes in file jquery.easyui.min.js line 3924
from
Code:
if(_2ad.onClose){
_2ad.onClose.call(this);
}

to
Code:
if(_2ad && _2ad.onClose){
_2ad.onClose.call(this);
}

// perhaps better
if(opts.onClose){
opts.onClose.call(this);
}


OR

an object type param must be passed in  when calling  $.messager.progress() even if a blank one.
Code:
$.messager.progress({});


Title: Re: a bug occurred when closing messager
Post by: hahamed on May 26, 2015, 09:55:19 PM
Thanks


Title: Re: a bug occurred when closing messager
Post by: siccak on September 08, 2015, 02:02:17 AM
Thanks, $.messager.progress({}); helped.