Bug Tracker

Changeset 5551

Show
Ignore:
Timestamp:
05/11/08 14:41:11 (8 months ago)
Author:
paul.bakaus
Message:

ui-draggable: fixed relative positioning issue with helpers

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/ui.draggable.js

    r5433 r5551  
    5151            this.helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [e])) : (o.helper == 'clone' ? this.element.clone() : this.element); 
    5252            if(!this.helper.parents('body').length) this.helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo)); 
    53             if(!this.helper.css("position") || this.helper.css("position") == "static") this.helper.css("position", "absolute"); 
     53            if(this.helper[0] != this.element[0] && !(/(fixed|absolute)/).test(this.helper.css("position"))) this.helper.css("position", "absolute"); 
    5454 
    5555            /* 
     
    520520        start: function(e,ui) { 
    521521            var group = $.makeArray($(ui.options.stack.group)).sort(function(a,b) { 
    522                 return (parseInt($(a).css("zIndex")) || ui.options.stack.min) - (parseInt($(b).css("zIndex")) || ui.options.stack.min); 
     522                return (parseInt($(a).css("zIndex"),10) || ui.options.stack.min) - (parseInt($(b).css("zIndex"),10) || ui.options.stack.min); 
    523523            }); 
    524524