jQuery UI 1.8rc1 Bug/Fixing

jQuery UI 1.8rc1 Bug/Fixing

HTML Code:

$(".selector").draggable({stack: { group: ".selector " , min: 10 }});


Bug/Error:

group[0].style is undefined

 

Fix (line number 1342, release: jQuery UI 1.8rc1):

  1. var min = parseInt(group[0].style.zIndex) || 0; // original line of jquery-ui

  2. var min = parseInt($(group[0].group).css("zIndex")) || 0; // my replaced line

  1. this.style.zIndex = min + i; // original line of jquery-ui
  2. $(group[i].group).css({"zIndex": min + i }); // my replaced line

I am new to jQuery - still learning many things. I caught the above error when defining the group in stack option. I tried to fix it and it works. I would appreciate if update me about this bug/fix.

Thanks