From 3136f82ed8e167a6040a049cfb0aadb16c0a832a Mon Sep 17 00:00:00 2001 From: valerii Date: Thu, 7 Oct 2021 16:59:31 +0300 Subject: [PATCH 1/2] Fixed regression issue: HMI does not wait timeout on button Reset timeout pressed during SubtleAlert processing --- app/view/sdl/SubtleAlertPopUp.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/view/sdl/SubtleAlertPopUp.js b/app/view/sdl/SubtleAlertPopUp.js index a0a0314b5..98a91ee77 100644 --- a/app/view/sdl/SubtleAlertPopUp.js +++ b/app/view/sdl/SubtleAlertPopUp.js @@ -59,6 +59,14 @@ SDL.SubtleAlertPopUp = Em.ContainerView.create( reason: '', message: undefined, click(event) { + const path = event.path; + for(const pathElement of path) { + if ('className' in pathElement + && typeof pathElement.className === 'string' + && pathElement.className.match(/resetTimeoutButton|ResetTimeoutPopUp/)) { + return; + } + } if (document.getElementById('SubtleAlertPopUp').contains(event.target)){ var buttonsDiv = document.getElementById('subtleAlertSoftButtons'); for (var button of buttonsDiv.childNodes) { From c2477c37aa76f4f73844f00a5dc677acd2797c16 Mon Sep 17 00:00:00 2001 From: valerii Date: Tue, 12 Oct 2021 11:26:48 +0300 Subject: [PATCH 2/2] Refactored click event of SubtleAlertPopUp --- app/view/sdl/SubtleAlertPopUp.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/view/sdl/SubtleAlertPopUp.js b/app/view/sdl/SubtleAlertPopUp.js index 98a91ee77..118796940 100644 --- a/app/view/sdl/SubtleAlertPopUp.js +++ b/app/view/sdl/SubtleAlertPopUp.js @@ -59,14 +59,6 @@ SDL.SubtleAlertPopUp = Em.ContainerView.create( reason: '', message: undefined, click(event) { - const path = event.path; - for(const pathElement of path) { - if ('className' in pathElement - && typeof pathElement.className === 'string' - && pathElement.className.match(/resetTimeoutButton|ResetTimeoutPopUp/)) { - return; - } - } if (document.getElementById('SubtleAlertPopUp').contains(event.target)){ var buttonsDiv = document.getElementById('subtleAlertSoftButtons'); for (var button of buttonsDiv.childNodes) { @@ -78,7 +70,8 @@ SDL.SubtleAlertPopUp = Em.ContainerView.create( this.deactivate(); SDL.SDLController.onActivateSDLApp({ appID: SDL.SubtleAlertPopUp.appID }); SDL.SDLController.onSubtleAlertPressed(SDL.SubtleAlertPopUp.appID); - } else{ + } else if(!document.getElementById('right_view').contains(event.target) + && !document.getElementById('ResetTimeoutPopUp').contains(event.target)) { SDL.SubtleAlertPopUp.deactivate(); } },