From 0424836ba80eafdeb64abac18b9a149bede2d5bf Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 22 Sep 2022 09:20:50 -0600 Subject: [PATCH] If widget fails validation during submit check, scroll it into view --- api/js/etemplate/etemplate2.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/js/etemplate/etemplate2.ts b/api/js/etemplate/etemplate2.ts index c49fd85bb6..5389268286 100644 --- a/api/js/etemplate/etemplate2.ts +++ b/api/js/etemplate/etemplate2.ts @@ -1099,6 +1099,11 @@ export class etemplate2 { (tmpWidget).activateTab(invalid_widgets[0]); } + // scroll the widget into view + if(typeof widget.scrollIntoView === 'function') + { + widget.scrollIntoView(); + } } else {