EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Ellipsis on March 20, 2013, 04:11:46 AM



Title: Panel resize events crashes browser [solved] [conflict Bootstrap]
Post by: Ellipsis on March 20, 2013, 04:11:46 AM
On the resize event of a panel or a datagrid column, the console will output :

TypeError: _6d.proxy is null

_6d.proxy.css({left:e.pageX-$(_6e).offset().left-1,display:"block"});

and the mousedown seems to hang (cursor doesn't change)

"SOLVED" the white screen, but still not the normal expected behaviour

Made some changes to jquery.datagrid.js:  (row 515 ..)

Code:
onResize:function(e){
[color=blue]if(_6d.proxy)[/color]
_6d.proxy.css({left:e.pageX-$(_6e).offset().left-1,display:"block"});
return false;
},onStopResize:function(e){
_70.css("cursor","");
var _78=$(this).parent().attr("field");
var col=_6a(_6c,_78);
col.width=$(this)._outerWidth();
col.boxWidth=parseInt(this.style.width);
col.auto=undefined;
_4e(_6c,_78);
[color=blue]if(_6d.proxy)[/color]_6d.proxy.remove();
_6d.proxy=null;
if($(this).parents("div:first.datagrid-header").parent().hasClass("datagrid-view1")){
_1e(_6c);
}


And to jquery.resizable.js : (row 62)

Code:
function _e(e){
_1=false;
_4(e,true);
_9(e);
$.data(e.data.target,"resizable").options.onStopResize.call(e.data.target,e);
//$(document).unbind(".resizable");
[color=blue]$(".resizable").unbind();[/color]


Note:  the unbind method is deprecated in the current jQuery version (it was from jQuery 1.7), rather to use the on and off methods and use a namespace.
It also seems a very costly event to unbind like this (on the entire document)  

Too bad :(
Still this not provide an actual answer because the actual resize event is being called by every mousemove, the mouse cursor changes back but the event is still called by every click. It will not release the column or panel.

I also use underscore.js, bootstrap.js and modernzr.js


Title: Re: Panel resize events crashes browser
Post by: Ellipsis on March 21, 2013, 03:35:18 AM
found cause, easyui conflicts with bootstrap.