This is a migrated thread and some comments may be shown as answers.

Mouse down, move out of browser bug

1 Answer 44 Views
Slider
This is a migrated thread and some comments may be shown as answers.
SteveChadbourne
Top achievements
Rank 1
SteveChadbourne asked on 10 Aug 2007, 01:58 AM
Hi

There appears to be a problem with the slider. To replicate the problem:

1) Go to any of the slider example pages on your web site
2) Click on the slider - with the mouse button held down move the pointer outside the browser window
3) Release the mouse button
4) Move mouse back into browser window - slider now moves back and forward even though no mouse button is down.

The same problem happens with the Ajax control toolkit slider.

Cheers

Steve

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 10 Aug 2007, 07:45 AM
Hi SteveChadbourne,
Actually this behavior can be observed only under IE and it is expected behavior as once the mouse leaves the browser window its events are overwritten and the RadSlider is not informed that you have released the mouse button. We are currently looking for ways to improve that behavior. 

Actually, you can test this by yourself by using a simple DIV element - you will get the same behavior:
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Untitled Page</title> 
    <style type="text/css">  
    html, body, form  
    {  
        height:100%;             
    }  
    </style> 
</head> 
<body onmousemove="MoveDiv(); return false;" > 
    <script type="text/javascript">  
    var div = null;  
    var initialTop = 0;  
    var initialLeft = 0;  
      
    function TakeDiv()  
    {  
        div = document.getElementById("testDiv");  
        if (event.stopPropagation) event.stopPropagation();  
    }  
      
    function ReleaseDiv()  
    {  
        if(div)  
        {  
            div = null;  
        }  
    }  
      
    function MoveDiv()  
    {  
        if(div)  
        {  
            initialTop = event.clientY - 10;  
            initialLeft = event.clientX - 10;  
              
            div.style.top = initialTop + "px";  
            div.style.left = initialLeft + "px";     
        }  
    }  
    </script> 
    <form id="form1" runat="server">  
        <div style="width:50px;height:50px;background-color:Red;position:absolute;top:0px;left:0px;"   
            id="testDiv" 
            onmousedown="TakeDiv(); return false;" 
            onmouseup="ReleaseDiv(); return false;">  
        </div> 
    </form>      
</body> 
</html> 


Kind regards,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Slider
Asked by
SteveChadbourne
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or