Coomer,
It's not much of a big deal anyway. But for Safari browsers, the more a page is scrolled down, the floating div (with preview of the thread's content) will appear further and further below the mouse pointer to a point it goes outside of the browser's viewable area.
I took a look into the source, and provided you with a fix (please confirm though). Hopefully this will help improve your website.
Under: http://www.6gc.net/forums/sources/action_p.../TPH/d21_tph.js
>
you could replace the above function with the following fix (or at least... believed to be a fix):
>
Cheers
It's not much of a big deal anyway. But for Safari browsers, the more a page is scrolled down, the floating div (with preview of the thread's content) will appear further and further below the mouse pointer to a point it goes outside of the browser's viewable area.
I took a look into the source, and provided you with a fix (please confirm though). Hopefully this will help improve your website.
Under: http://www.6gc.net/forums/sources/action_p.../TPH/d21_tph.js
>
CODE
>
function preview_do(e)
{
cx = (ns5) ? e.pageX : event.x+tbody().scrollLeft;
cy = (ns5) ? e.pageY : event.y+tbody().scrollTop;
var r = ((ie4 || ie5) && !window.opera) ? tbody().clientWidth-event.clientX-ox : window.innerWidth-e.clientX-ox-20;
var b = ((ie4 || ie5) && !window.opera) ? tbody().clientHeight-event.clientY-oy : window.innerHeight-e.clientY-oy-20;
var l = (ox < 0) ? ox*(-1) : -1000;
if (r < obj.offsetWidth)
{
obj.style.left = (ie4 || ie5) ? tbody().scrollLeft+event.clientX-obj.offsetWidth+'px' : window.pageXOffset+e.clientX-obj.offsetWidth+'px';
}
else if (cx < l)
{
obj.style.left = '5px';
}
else
{
obj.style.left = cx+ox+'px';
}
if (b < obj.offsetHeight)
{
obj.style.top = (ie4 || ie5) ? tbody().scrollTop+event.clientY-obj.offsetHeight-oy+'px' : window.pageYOffset+e.clientY-obj.offsetHeight-oy+'px';
}
else
{
obj.style.top = cy+oy+'px';
}
}
>
>function preview_do(e)
{
cx = (ns5) ? e.pageX : event.x+tbody().scrollLeft;
cy = (ns5) ? e.pageY : event.y+tbody().scrollTop;
var r = ((ie4 || ie5) && !window.opera) ? tbody().clientWidth-event.clientX-ox : window.innerWidth-e.clientX-ox-20;
var b = ((ie4 || ie5) && !window.opera) ? tbody().clientHeight-event.clientY-oy : window.innerHeight-e.clientY-oy-20;
var l = (ox < 0) ? ox*(-1) : -1000;
if (r < obj.offsetWidth)
{
obj.style.left = (ie4 || ie5) ? tbody().scrollLeft+event.clientX-obj.offsetWidth+'px' : window.pageXOffset+e.clientX-obj.offsetWidth+'px';
}
else if (cx < l)
{
obj.style.left = '5px';
}
else
{
obj.style.left = cx+ox+'px';
}
if (b < obj.offsetHeight)
{
obj.style.top = (ie4 || ie5) ? tbody().scrollTop+event.clientY-obj.offsetHeight-oy+'px' : window.pageYOffset+e.clientY-obj.offsetHeight-oy+'px';
}
else
{
obj.style.top = cy+oy+'px';
}
}
>
you could replace the above function with the following fix (or at least... believed to be a fix):
>
CODE
>
function preview_do(e)
{
if (typeof e != "undefined") {
ox = e.pageX;
oy = e.pageY;
} else if (typeof window.event !="undefined") {
ox = tbody().scrollLeft + event.clientX
oy = tbody().scrollTop + event.clientY
}
var docwidth = document.all? tbody().scrollLeft + tbody().clientWidth : pageXOffset + window.innerWidth - 20;
var docheight = document.all? tbody().scrollTop + tbody().clientHeight : pageYOffset + window.innerHeight;
if (ox + obj.offsetWidth > docwidth) {
obj.style.left = ox - obj.offsetWidth + "px";
} else {
obj.style.left = ox + "px";
}
if (oy + obj.offsetHeight > docheight) {
obj.style.top = oy - obj.offsetHeight + "px";
} else {
obj.style.top = oy + "px";
}
}
>
>function preview_do(e)
{
if (typeof e != "undefined") {
ox = e.pageX;
oy = e.pageY;
} else if (typeof window.event !="undefined") {
ox = tbody().scrollLeft + event.clientX
oy = tbody().scrollTop + event.clientY
}
var docwidth = document.all? tbody().scrollLeft + tbody().clientWidth : pageXOffset + window.innerWidth - 20;
var docheight = document.all? tbody().scrollTop + tbody().clientHeight : pageYOffset + window.innerHeight;
if (ox + obj.offsetWidth > docwidth) {
obj.style.left = ox - obj.offsetWidth + "px";
} else {
obj.style.left = ox + "px";
}
if (oy + obj.offsetHeight > docheight) {
obj.style.top = oy - obj.offsetHeight + "px";
} else {
obj.style.top = oy + "px";
}
}
>
Cheers
-TomazWSwww.tomazws.com