Custom Query (7259 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (19 - 21 of 7259)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Ticket Resolution Summary Owner Reporter
#5959 invalid "offsetParent[0] is undefined" error in sortable kamity kamity
Description

I have a draggable list on the page, whose items are connected to multiple sortable lists using 'connectToSortable'. When I drag the first element and drop in to one of the sortables, it works fine. But on subsequent operations, the drag/drop fails with the following errors in the FF (3.6.8) console.

Error: this.offsetParent[0] is undefined
Source File: http://www.ship.989studios.com/js/jquery/ui/jquery-ui-1.8.4.custom.js
Line: 3871

Error: scroll[0] is undefined
Source File: http://www.ship.989studios.com/js/jquery/ui/jquery-ui-1.8.4.custom.js
Line: 3960

After changing the method _getParentOffset in jquery-ui-1.8.4.custom.js as follows, it works fine. Is this a valid fix?

        _getParentOffset: function() {

                //Get the offsetParent and cache its position
                this.offsetParent = this.helper.offsetParent();
                var po = this.offsetParent.offset();

                // This is a special case where we need to modify a offset calculated on start, since the following happened:
                // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
                // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
                //    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
                if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
                        po.left += this.scrollParent.scrollLeft();
                        po.top += this.scrollParent.scrollTop();
                }
                var isOffsetParentFound = (this.offsetParent != null && this.offsetParent[0] != null);

                if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
                || (isOffsetParentFound && this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
                        po = { top: 0, left: 0 };
                if (po == null)
                {
                        po = { top: 0, left: 0 };
                }

                return {
                        top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
                        left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
                };

        }

Thanks

#3833 fixed "open demo in a new window" doesn't, it opens in the same window/tab fg.maggie
Description

still seeing it open in same tab/window on FF Mac (ui-dev).

#5002 worksforme "open" event handler doesn't receive ui parameter ssaki
Description

a custom "open" event function receives only the event parameter (ui is undefined)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Note: See TracQuery for help on using queries.