I upgraded my forum from 1.6 to 1.8 and adjusted my templates appropriately. Everything seems to be working fine except for the popup menu.
The popup menu of the edit post button is completely displaced while the popup menu for the Thread Modes is placed correctly. See screenshots.
My forum is wrapped within a centered div element with position attribute set to relative.
In addition I am using a top spacer div element where the position is also set to relative.
<div id="submenuTopSpacer"></div>
<div id="mainWrapper"> ...
#submenuTopSpacer {
background: none repeat scroll 0 0 #bfd5de;
height: 50px;
position: relative;
width: 100%;
}
#mainWrapper {
background-color: #ffffff;
margin: 0 auto;
position: relative;
width: 960px;
z-index: auto;
}
I think that the problem is that the java script code in jquery.plugins.min.js does not set the position properly if the forum is placed within position:relative elements.
I fixed the problem by adding the following lines to the script:
// Setup popup menu
var offset = el.offset();
// WoM fix edit popup menu start
var el_parent = el.get(0).parentNode;
var popup_parent = popup_menu.get(0).parentNode;
if (el_parent === popup_parent)
{
offset = el.position();
}
// WoM fix edit popup menu end
offset.top += el.outerHeight();
The changed script simply uses the position() command instead of the offset() command if the popup element and the button have the same parent node. The addition to the script fixes my problem. Maybe you may consider to add the changes to the next version or hava another advice to fix the problem without changing the js files.
Here is the link to my forums:
http://murlengine.com/forum/?murlpage=forum
Thanks!
The popup menu of the edit post button is completely displaced while the popup menu for the Thread Modes is placed correctly. See screenshots.
My forum is wrapped within a centered div element with position attribute set to relative.
In addition I am using a top spacer div element where the position is also set to relative.
<div id="submenuTopSpacer"></div>
<div id="mainWrapper"> ...
#submenuTopSpacer {
background: none repeat scroll 0 0 #bfd5de;
height: 50px;
position: relative;
width: 100%;
}
#mainWrapper {
background-color: #ffffff;
margin: 0 auto;
position: relative;
width: 960px;
z-index: auto;
}
I think that the problem is that the java script code in jquery.plugins.min.js does not set the position properly if the forum is placed within position:relative elements.
I fixed the problem by adding the following lines to the script:
// Setup popup menu
var offset = el.offset();
// WoM fix edit popup menu start
var el_parent = el.get(0).parentNode;
var popup_parent = popup_menu.get(0).parentNode;
if (el_parent === popup_parent)
{
offset = el.position();
}
// WoM fix edit popup menu end
offset.top += el.outerHeight();
The changed script simply uses the position() command instead of the offset() command if the popup element and the button have the same parent node. The addition to the script fixes my problem. Maybe you may consider to add the changes to the next version or hava another advice to fix the problem without changing the js files.
Here is the link to my forums:
http://murlengine.com/forum/?murlpage=forum
Thanks!