|
Title: How to handle "easyui-menu" when position off screen? Post by: Jonny on April 13, 2015, 08:41:10 PM Dear All,
I am facing a kind of bug in easyui-menu or I am just an ignorance..... If the mouse position in the middle of screen... the menu displayed well... But when the mouse position was near bottom of screen the menu just covered partially ( not visible ) by windows taskbar .... Please take a look at my JPGs file.... If there is any setting / parameter was missing, please tell me... Regards, Jonny Title: Re: How to handle "easyui-menu" when position off screen? Post by: stworthy on April 13, 2015, 11:12:35 PM Please open this example http://www.jeasyui.com/demo/main/index.php?plugin=Menu&theme=default&dir=ltr&pitem=Basic, right click on any position of the page to display the menu, the menu works fine.
Title: Re: How to handle "easyui-menu" when position off screen? Post by: Jonny on April 14, 2015, 04:24:01 AM Dear Stworthy,
Frankly, my menu was taken from the link of yours....I only change the variable name.... Just forget to tell you.. that i create the menu in the center of Easyui-Layout .... This easyui-layout located inside easyui-tab... This situation maybe a bit different with normal situation... Below is my code: <div id="mm" class="easyui-menu" style="width:200px;"> <div data-options="iconCls:'icon-add'" onclick="newdata()">Input data (New)</div> <div data-options="iconCls:'icon-save'" onclick="editdata()">Ralat Data </div> <div data-options="iconCls:'icon-cancel'" onclick="deletedata()">Hapus Data </div> <div class="menu-sep"></div> <div data-options="iconCls:'icon-search'" onclick="hisbeli()" >History Beli</div> <div data-options="iconCls:'icon-search'" onclick="hisretur()">History Retur Beli</div> <div data-options="iconCls:'icon-search'" onclick="hisbayar()">History Bayar</div> <div data-options="iconCls:'icon-search'" onclick="histunggak()">Faktur Belum Lunas</div> </div> <script> $('#center').bind('contextmenu',function(e){ e.preventDefault(); $('#mm').menu('show', { left: e.pageX, top: e.pageY }); }); </script> So, Totally there are 3 layers which are put below the menu: 1. easyui-datagrid 2. easyui-layout --> center 3. easyui-tab May be I am just the ignorance..If need any extra setting... Please guide me.... Regards, Jonny Title: Re: How to handle "easyui-menu" when position off screen? Post by: stworthy on April 14, 2015, 07:22:24 AM Please refer to this example https://jsfiddle.net/3qv2f4cu/
Title: Re: How to handle "easyui-menu" when position off screen? Post by: Jonny on April 15, 2015, 08:25:17 AM Hello Stworthy,
Thank you very much.... Now, the menu can auto locate inside the screen at any where.... Apparently it need easyui-layout to fulfil the body / screen... So easyui-menu can recognize the screen perfectly.... Regards, Jonny |