From 043738313222433026f6e9449c3c003e514d954a Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Fri, 17 Jan 2020 10:40:18 +0100 Subject: [PATCH] Add timeout to scroll efect --- app/assets/javascripts/repositories/row_editor.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/repositories/row_editor.js b/app/assets/javascripts/repositories/row_editor.js index 97e7b3c78..ac23689ef 100644 --- a/app/assets/javascripts/repositories/row_editor.js +++ b/app/assets/javascripts/repositories/row_editor.js @@ -99,10 +99,13 @@ var RepositoryDatatableRowEditor = (function() { TABLE.ajax.reload(() => { animateSpinner(null, false); HelperModule.flashAlertMsg(data.flash, 'success'); - window.scrollTo({ - left: 0, - behavior: 'smooth' - }); + + setTimeout(() => { + window.scrollTo({ + left: 0, + behavior: 'smooth' + }); + }, 400); }); });