EasyUI Forum
May 03, 2024, 12:05:44 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: Message Box Position z-index seems to be wrong  (Read 13146 times)
Kevin
Jr. Member
**
Posts: 52


View Profile Email
« on: November 17, 2012, 08:54:07 PM »

I have a layout which has been defined for the whole page. There is a North and Center section. When I try to display a message with a call to $.messager.show, the message is under the North part. Please see the attached example. This is the example of the code used;
Code:
<!DOCTYPE html>
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>Layout</title>
   <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
   <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
   <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery-1.8.0.min.js"></script>
   <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
   <script>
      function topCenter() {
         $.messager.show({
                title: 'Title',
                msg: 'Message',
                showType: 'slide',
                style: {
                   right: '',
                   top: document.body.scrollTop + document.documentElement.scrollTop,
                   bottom: ''
                }
         });
      }
   </script> 
</head>
<body class="easyui-layout">
   <div data-options="region:'north'" style="height:30px"></div> 
   <div data-options="region:'center'"> 
      <a href="javascript:void(0)" class="easyui-linkbutton" onclick="topCenter()">TopCenter</a> 
   </div> 
</body> 
</html>
I get the same error in FF, IE and Chrome. I've also tried using jQuery V1.7.2 with no luck.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 18, 2012, 05:40:00 AM »

This bug will be fixed in next version(1.3.2). Try the following code to solve this issue.
Code:
         $.messager.show({
                title: 'Title',
                msg: 'Message',
                showType: 'slide',
                style: {
                   right: '',
                   top: document.body.scrollTop + document.documentElement.scrollTop,
                   bottom: '',
                   zIndex: $.fn.window.defaults.zIndex++
                }
         });
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!