From 2ce9185611e9b2216fb86e53d6a9bfa9858330dc Mon Sep 17 00:00:00 2001 From: Loc Nguyen <121596218+ntloc-axonivy@users.noreply.github.com> Date: Tue, 10 Sep 2024 10:50:19 +0700 Subject: [PATCH] IVYPORTAL-17429 Close expanded widgets with esc button (#1019) --- AxonIvyPortal/portal/webContent/resources/js/portal.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AxonIvyPortal/portal/webContent/resources/js/portal.js b/AxonIvyPortal/portal/webContent/resources/js/portal.js index dfd1153560f..befc0c83b53 100644 --- a/AxonIvyPortal/portal/webContent/resources/js/portal.js +++ b/AxonIvyPortal/portal/webContent/resources/js/portal.js @@ -549,6 +549,13 @@ $(document).ready(function() { focusedElement.focus(); } } + + if (event.key === 'Escape') { + var collapseWidgetBtn = $('[id*="collapse-link"]:visible'); + if (collapseWidgetBtn) { + collapseWidgetBtn.click(); + } + } }); });