From 288a0fa137f2e16b406788185423c800ea7b4848 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 23 Oct 2018 17:09:24 +0200 Subject: [PATCH] Elastic: Fix js error when accessing page jumper input with a Tab key --- skins/elastic/ui.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index ebb00dfcb..54346a8f4 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -2240,7 +2240,8 @@ function rcube_elastic_ui() $(this).data('event', 'mouse'); }) .on('keydown', function(e) { - switch (e.originalEvent.which) { + if (e.originalEvent) { + switch (e.originalEvent.which) { case 13: case 32: // Open the popup on ENTER or SPACE @@ -2251,6 +2252,7 @@ function rcube_elastic_ui() // Close the popup on ESC key $(this).popover('hide'); break; + } } });