From 96457d07bbfa0cba5b8679b12c62edcead86bb6f Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Thu, 16 Jan 2020 16:34:45 +0100 Subject: [PATCH] Scroll left on new item in datatables --- app/assets/javascripts/repositories/row_editor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/repositories/row_editor.js b/app/assets/javascripts/repositories/row_editor.js index 6f1cdb177..97e7b3c78 100644 --- a/app/assets/javascripts/repositories/row_editor.js +++ b/app/assets/javascripts/repositories/row_editor.js @@ -99,6 +99,10 @@ var RepositoryDatatableRowEditor = (function() { TABLE.ajax.reload(() => { animateSpinner(null, false); HelperModule.flashAlertMsg(data.flash, 'success'); + window.scrollTo({ + left: 0, + behavior: 'smooth' + }); }); });