From 3e31f114d473b7fff0d0205edf02bcd1cbad0a65 Mon Sep 17 00:00:00 2001 From: zmagod Date: Thu, 15 Dec 2016 10:51:17 +0100 Subject: [PATCH] app/assets/javascripts/samples/sample_datatable.js --- app/assets/javascripts/samples/sample_datatable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/samples/sample_datatable.js b/app/assets/javascripts/samples/sample_datatable.js index 6e34a0742..4e34e8ed4 100644 --- a/app/assets/javascripts/samples/sample_datatable.js +++ b/app/assets/javascripts/samples/sample_datatable.js @@ -1040,13 +1040,13 @@ function changeToEditMode() { }, error: function(xhr, ajaxOptions, thrownError) { dropdownList.sortable('disable'); - var verticalHeight = $(li).offset().top; - dropdownList.scrollTo(verticalHeight,0); $(li).clearFormErrors(); var msg = $.parseJSON(xhr.responseText); renderFormError(event, $(li).find('.text-edit'), Object.keys(msg)[0] + ' '+ msg.name.toString()); + var verticalHeight = $(li).offset().top; + dropdownList.scrollTo(verticalHeight,0); } }); }