Hi JR

Thanks for the reply.

After a bit of digging I did manage to code a hack to fix it. The
problem was that the helper needed to have the top value adjusted to
reflect the position within the scrolled document. I managed to track
down the _mouseDrag: function(e) which is where I implemented the
hack. I guess it could be implemented somewhere else but it works here
so I will leave it there. Here is the hack for the _mouseDrag:
function(e)

        _mouseDrag: function(e) {

                //Compute the helpers position
                this.position = this._generatePosition(e);
                this.positionAbs = this._convertPositionTo("absolute");
                //Call plugins and callbacks and use the resulting position if
something is returned
                this.position = this._propagate("drag", e) || this.position;

                if(!this.options.axis || this.options.axis != "y")
this.helper[0].style.left = this.position.left+'px';
                //C PETERSON 22-10-2008
                //START FIX: Small hack to fix IE helper offset problem when a
window is scrolled
                if($.browser.msie)
                {
            var scrollTop = window.pageYOffset ||
document.documentElement.scrollTop || 0;
                    if(!this.options.axis || this.options.axis != "x")
this.helper[0].style.top = this.position.top+scrollTop +'px';
                }
                else
                {
                    if(!this.options.axis || this.options.axis != "x")
this.helper[0].style.top = this.position.top +'px';
                }
                //END FIX
                if($.ui.ddmanager) $.ui.ddmanager.drag(this, e);

                return false;
        }

If anybody else can make betters suggestions please do - for now it is
working.

Cheers
Colin

On Oct 22, 4:10 am, tallvanilla <[EMAIL PROTECTED]> wrote:
> Hi Colin. This recent thread might be of interest to you. I've been
> trying to keep it alive long enough for someone to fix the dragging
> offset bugs.
>
> http://groups.google.com/group/jquery-ui/browse_thread/thread/ff478ce...
>
> JR
>
> On Oct 21, 2:30 am, electronstream <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi
>
> > Can anyone make any suggestions regarding the following problem which
> > only happens in IE and not in FF, Chrome etc.
>
> > Synopsis:
>
> > I have a page that has a header (+- 120px in height) followed by 2
> > main divs  (content and right bar). The right bar contains user
> > 'tools' one of which is a favorites container. The search page
> > contains a list or results each and each result has a small icon which
> > can be dragged into the favorites container. The search page is set to
> > return 20 results per page which will cause the page to scroll.
>
> > Problem:
>
> > If a user drags the first result 'drag' icon the icon appears under
> > the mouse cursor and can be dropped perfectly. If a user scrolls the
> > page to the last result and drags the 'drag' image the drag icon
> > appears at an offset to the mouse cursor that is equal to the scroll
> > offset of the document. The drop is detected perfectly when
> > positioning the mouse cursor in the favorites drop area but at this
> > point the drag icon is still at the offset.
>
> > I am setting up the draggable as follows:
>
> > $(".searchResultDraggable").draggable({helper: 'clone', zIndex :
> > '99999', scroll : 'false',start: prepareDragToFavorites, appendTo :
> > 'body', cursor : 'pointer'});
>
> > Is there anyway to force the drag icon to always appear under the
> > mouse cursor in IE? The page scrolls perfectly but the icon remains
> > offset if the initial page had been scrolled.
>
> > Thanks
> > Colin- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to