UI Resizable

UI Resizable


Hello,
I have som fixes to use UI drag and resize in table columns.
<table width="200" style="table-layout:fixed;">
<tr>
<th width="100" style="overflow:hidden;" class="ui-resizable"><div
style="position:relative;">cell 1<div unselectable="on" class="ui-
resizable-handle ui-resizable-e" style="-moz-user-select:none;"></
div></div></th>
<th width="100" style="overflow:hidden;" class="ui-resizable"><div
style="position:relative;">cell 2<div unselectable="on" class="ui-
resizable-handle ui-resizable-e" style="-moz-user-select:none;"></
div></div></th>
</tr>
</table>
Fix 1. _mouseCapture
This check fails on msie, why?
for(var i in this.handles) {
            if($(this.handles[i])[0] == event.target) handle = true;
}
++if(handle == false && $.browser.msie &&
event.target.parentNode.nodeName=='TH'){
++    //Compare classnames
++    for(var i in this.handles) {
++        if($(this.handles[i])[0].className == event.target.className)
handle = true;
++    }
++}
Fix 2. _mouseStart
Fixed wrongly, safari brokes
// bugfix for http://dev.jquery.com/ticket/1749
--if (el.is('.ui-draggable') || (/absolute/).test(el.css('position')))
{
--    el.css({ position: 'absolute', top: iniPos.top, left:
iniPos.left });
--}
++if ($.browser.msie && (el.is('.ui-draggable') || (/absolute/).test
(el.css('position'))) && event.target.parentNode.nodeName!='TH') {
++    el.css({ position: 'absolute', top: iniPos.top, left:
iniPos.left });
++}