-
-
Notifications
You must be signed in to change notification settings - Fork 34
Memory leak in EditableColumn #116
Comments
Hi, i have noticed the same problem. If I change the these links in the Editable.php file //wrap in anonymous function for live update
if($this->liveTarget) {
$script .= "\n $('body').on('ajaxUpdate.editable', function(e){ if(e.target.id == '".$this->liveTarget."') yiiEditable(); });";
$script = "(function yiiEditable() {\n ".$script."\n}());";
} to the following //wrap in anonymous function for live update
if($this->liveTarget) {
$script .= "\n $('body').on('ajaxUpdate.editable', function(e){ if(e.target.id == '".$this->liveTarget."') {console.log('event fired'); yiiEditable();} });";
$script = "(function yiiEditable() {\n ".$script."\n}());";
} You will see in your js console that the event is fired twice after the 1st ajax request, 4 times for the 2nd ajax request, 8 times for the 3rd ajax request ... So far i have no clue how to fix this issue and would really be pleased if someone got a solution. I only know that if i add a unbind before the binding i only get one event triggered. if($this->liveTarget) {
$script .= "\n $('body').unbind('ajaxUpdate.editable'); \n";
$script .= "\n $('body').on('ajaxUpdate.editable', function(e){ if(e.target.id == '".$this->liveTarget."') {console.log('event fired'); yiiEditable();} });";
$script = "(function yiiEditable() {\n ".$script."\n}());";
} But then i cannot have multiple editable columns on a gridview. But this one column works flawlessly, regards Horizons |
On the clevertech YiiBooster they have found a fix for this problem. |
Hi,
Please see your demo DataGrid
http://x-editable.demopage.ru/index.php?r=site/widgets#EditableColumn
Clicking on pages 1,2,1,2,1,2.... cause browser to freeze. Only page reload helps, but it is ajax application...
Please, see if you can help!
Thx
The text was updated successfully, but these errors were encountered: