From 22cea7fe30faff2eab72482965ccacc9ada8547f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Wed, 19 Jul 2023 13:09:25 +0200 Subject: [PATCH 1/2] IBX-1133: An exception occurred while searching for available contents in back office (#2105) --- .../Resources/public/js/scripts/sidebar/instant.filter.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bundle/Resources/public/js/scripts/sidebar/instant.filter.js b/src/bundle/Resources/public/js/scripts/sidebar/instant.filter.js index 4f8438c2f3..166f3de857 100644 --- a/src/bundle/Resources/public/js/scripts/sidebar/instant.filter.js +++ b/src/bundle/Resources/public/js/scripts/sidebar/instant.filter.js @@ -41,6 +41,11 @@ filterInput.addEventListener('change', filterItems.bind(filter, itemsMap, groups), false); filterInput.addEventListener('blur', filterItems.bind(filter, itemsMap, groups), false); filterInput.addEventListener('keyup', filterItems.bind(filter, itemsMap, groups), false); + filterInput.addEventListener('keydown', (event) => { + if (event.key === 'Enter') { + event.preventDefault(); + } + }, false); }; filters.forEach(initFilter); From 71298d2a5ec5ba99b69f707f900eaef2f5a4eb86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Wed, 19 Jul 2023 15:18:11 +0200 Subject: [PATCH 2/2] fix linter after merge --- .../public/js/scripts/sidebar/instant.filter.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/bundle/Resources/public/js/scripts/sidebar/instant.filter.js b/src/bundle/Resources/public/js/scripts/sidebar/instant.filter.js index a542588bd5..c0c8bf240b 100644 --- a/src/bundle/Resources/public/js/scripts/sidebar/instant.filter.js +++ b/src/bundle/Resources/public/js/scripts/sidebar/instant.filter.js @@ -39,11 +39,15 @@ filterInput.addEventListener('change', filterItems.bind(filter, itemsMap, groups), false); filterInput.addEventListener('blur', filterItems.bind(filter, itemsMap, groups), false); filterInput.addEventListener('keyup', filterItems.bind(filter, itemsMap, groups), false); - filterInput.addEventListener('keydown', (event) => { - if (event.key === 'Enter') { - event.preventDefault(); - } - }, false); + filterInput.addEventListener( + 'keydown', + (event) => { + if (event.key === 'Enter') { + event.preventDefault(); + } + }, + false, + ); }; filters.forEach(initFilter);