# HG changeset patch # User RĂ©mi Cardona # Date 1422442276 -3600 # Node ID 2094262d6553759a68f860fe14503d84738591f0 # Parent 4001cfe2f44d9f152bef0f680b46b03c7f784b12 [web/data] Fix userCallbackThenUpdateUI to completely replace old DOM elements Without the 'swap' parameter, userCallbackThenUpdateUI() would replace the _children_ of the component with a new version of the componenent, thus creating nested divs/spans/buttons/etc. Closes #4881299 diff -r 4001cfe2f44d -r 2094262d6553 web/data/cubicweb.ajax.js --- a/web/data/cubicweb.ajax.js Fri Jan 30 15:53:32 2015 +0100 +++ b/web/data/cubicweb.ajax.js Wed Jan 28 11:51:16 2015 +0100 @@ -538,7 +538,7 @@ var d = userCallback(cbname); d.addCallback(function() { $('#' + nodeid).loadxhtml(AJAX_BASE_URL, ajaxFuncArgs('render', {'rql': rql}, - registry, compid)); + registry, compid), null, 'swap'); if (msg) { updateMessage(msg); }