[Webkit-unassigned] [Bug 16890] select boxes are misbehaving when onmousedown, onmouseup events are registered for document

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 16 07:54:05 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=16890


aroben at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aroben at apple.com




------- Comment #1 from aroben at apple.com  2008-01-16 07:54 PDT -------
Here's the definition of the MouseDown and MouseUp functions from the page:

function MouseDown(e) 
{
        var found = false;
        var obj;

        if (isW3C)
        {
                obj = e.target;
        }
        else if (isIE)
        {
                e = window.event;
                obj = e.srcElement;
        }
        else return;

        if (   (obj.parentNode.id != null)
            && (obj.parentNode.id.indexOf(MainId) != -1))
        {
                current = obj.parentNode.style;

                dx = parseInt(e.clientX) - parseInt(current.left);

                if (isW3C)
                {
                        document.addEventListener("mousemove", MouseDrag,
true);
                        current.cursor =
"url(ImageGlucosurfer/hand-closed.ico),move";
                }
                else
                {
                        document.attachEvent("onmousemove", MouseDrag);
                        current.cursor =
"url(ImageGlucosurfer/hand-closed.ico),move";
                }
        }
        else
        {
                current = null;
        }
        return false;
}

function MouseUp(e)
{
    var x;

        if (isW3C)
        {
                document.removeEventListener("mousemove", MouseDrag, true);
        }
        else if (isIE)
        {
                document.detachEvent("onmousemove", MouseDrag);
        }

        if (current)
        {
                current.cursor = "url(ImageGlucosurfer/hand-open.ico),default";
    }

        current = null;
        return false;
}


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list