From 89f4333b3a482c27a65c78db982a38f2c7117616 Mon Sep 17 00:00:00 2001 From: bsatarnejad Date: Thu, 7 May 2020 08:57:21 +0200 Subject: [PATCH] start onboarding tour after pressing escape button --- app/assets/javascripts/onboarding/onboarding_tour.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/assets/javascripts/onboarding/onboarding_tour.js b/app/assets/javascripts/onboarding/onboarding_tour.js index ba640047b0..25bbd95e56 100644 --- a/app/assets/javascripts/onboarding/onboarding_tour.js +++ b/app/assets/javascripts/onboarding/onboarding_tour.js @@ -45,6 +45,13 @@ $('.op-modal--modal-close-button').click(function () { homescreenTour(); }); + + //Start automatically when the escape button is pressed + $(document).on('keydown', function(event) { + if (event.key == "Escape") { + homescreenTour(); + } + }); } // ------------------------------- Tutorial Homescreen page -------------------------------