EasyUI Forum
May 17, 2024, 02:53:58 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: a bug occurred when closing messager  (Read 10306 times)
crzdot
Newbie
*
Posts: 1


View Profile Email
« 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({});
« Last Edit: March 20, 2015, 06:56:11 PM by crzdot » Logged
hahamed
Newbie
*
Posts: 13


View Profile
« Reply #1 on: May 26, 2015, 09:55:19 PM »

Thanks
Logged
siccak
Newbie
*
Posts: 5


View Profile Email
« Reply #2 on: September 08, 2015, 02:02:17 AM »

Thanks, $.messager.progress({}); helped.
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!