Drag and Scroll

Drag and Scroll

Hi,

I am trying to create a webtop (web based desktop) using jQuery and jQueryUI. 

I've had a bit of success with this but now am trying to change the scrolling mechanism. I am dealing with something I call the scrollable desktop which means the viewport is usually smaller than the actual desktop. (I have this because a number of users with different screen resolutions may be using the webtop concurrently).

I am trying to implement a drag and scroll interface - where the user can drag an icon off the screen and the viewport just scrolls to keep up.

I'm glad to say that it's almost working :  http://happyworm.com/test/dragscroll/scroll08/

Note that this demo only deals with scrolling to the right. The desktop should scroll when the icon is less than 200 px from the left of the viewport's right hand side.

However there are some issues :

1. Only works in Firefox, Chrome and IE8( IE7/6 and Opera have seem to have screen issues when scrolling)
2. Sometimes the mousehold/mousedown event doesn't seem to fire even though the mouse button is pressed
3. When you drag the icon off the screen to the right the position often jumps
4. Jumpy scrolling when the drag event isn't firing but mousedown is causing the scrolling.

I think this mechanism could be useful for a number of projects. Any feedback on how I can improve this code would be greatly appreciated.

Thanks in advance

Mark