EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: gordis gmbh on October 20, 2016, 06:08:32 AM



Title: Uncaught TypeError: cannot read property scrollTop of null
Post by: gordis gmbh on October 20, 2016, 06:08:32 AM
In Chrome & IE 11 I get this error on calling:
Code:
	$.messager.show({
title:"Information",
msg: 'Login successful',
timeout:4000,
showType:'slide'
});


Please find the complete error stack attached.

In Firefox this is running fine. Any idea what the problem could be?


In function _2aF() at jquery.easyui.min.js:3893, the property scrollTop is accessed to calculate the style bottom :

Code:

var opts=$.extend({},$.messager.defaults,{
modal:false,
shadow:false,
draggable:false,
resizable:false,
closed:true,
style:{
   left:"",top:"",
   right:0,
   zIndex:$.fn.window.defaults.zIndex++,
   bottom:-document.body.scrollTop-document.documentElement.scrollTop
},
title:"",
width:250,
height:100,
minHeight:0,
showType:"slide",
showSpeed:600,
content:_2b0.msg,
timeout:4000},_2b0);



Title: Re: Uncaught TypeError: cannot read property scrollTop of null
Post by: stworthy on October 20, 2016, 08:01:04 PM
Please look at this example http://www.jeasyui.com/demo/main/index.php?plugin=Messager&theme=default&dir=ltr&pitem=

It works fine on Chrome and IE11.