[mapguide-trac] #17: AJAX viewer and IE - Images in tooltip
MapGuide Open Source
trac_mapguide at osgeo.org
Thu Mar 29 12:50:24 EDT 2007
#17: AJAX viewer and IE - Images in tooltip
--------------------------+-------------------------------------------------
Reporter: Andy Morsell | Owner: chrisclaydon
Type: defect | Status: new
Priority: high | Milestone:
Component: AJAX Viewer | Version:
Severity: critical | Resolution:
Keywords: | External_id: 922152
--------------------------+-------------------------------------------------
Comment (by chrisclaydon):
In Internet Explorer, under some circumstances, an onmousemove event is
issued when the tooltip is displayed, even though the mouse has not
actually moved. This causes the tooltip to be closed, and a new one is
opened shortly afterwards. That causes a new onmousemove event, and the
process repeats ad infinitum.
To fix the problem, a check can be added to the beginning of the
!OnMouseMove() method defined in ajaxmappane.templ to verify that the
mouse position really has changed before proceeding. For the bogus
onmousemove events generated by IE, the !OnMouseMove() method will then
return immediately, without closing the current tooltip. This solves the
problem.
The change involves changing this piece of code:
{{{
function OnMouseMove(e)
{
var x = e.clientX - mapPosX;
var y = e.clientY;
lastposx = x; lastposy = y;
}}}
to this:
{{{
function OnMouseMove(e)
{
var x = e.clientX - mapPosX;
var y = e.clientY;
if(x == lastposx && y == lastposy)
{
return false;
}
lastposx = x; lastposy = y;
}}}
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/17#comment:2>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list