From 9275da7cfc732a209d465dfc0041d7dc0a2abddd Mon Sep 17 00:00:00 2001 From: "Patrick St. laurent" <patrick@saint-laurent.us> Date: Fri, 11 Mar 2016 01:14:54 -0500 Subject: [PATCH] Incorrect deferred implementation This function creates a success object and a deferred object but the success object is never established as a handler for the deferred. In practice this means that the display callback is never executed and values are never rendered. --- .../js/bootstrap-editable.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dist/bootstrap3-editable/js/bootstrap-editable.js b/dist/bootstrap3-editable/js/bootstrap-editable.js index 562cabc..77edddb 100644 --- a/dist/bootstrap3-editable/js/bootstrap-editable.js +++ b/dist/bootstrap3-editable/js/bootstrap-editable.js @@ -2574,16 +2574,16 @@ List - abstract class for inputs that have source option loaded from js array or }, value2html: function (value, element, display, response) { - var deferred = $.Deferred(), - success = function () { - if(typeof display === 'function') { - //custom display method - display.call(element, value, this.sourceData, response); - } else { - this.value2htmlFinal(value, element); - } - deferred.resolve(); - }; + var deferred = $.Deferred(); + success = deferred.then(function () { + if(typeof display === 'function') { + //custom display method + display.call(element, value, this.sourceData, response); + } else { + this.value2htmlFinal(value, element); + } + deferred.resolve(); + }); //for null value just call success without loading source if(value === null) {