From 352acdcc36e7fe6a11f1e0cc0c0b07c1d7aba891 Mon Sep 17 00:00:00 2001 From: aryanshridhar Date: Thu, 13 May 2021 17:16:03 +0530 Subject: [PATCH] dropdown_list_widget: Properly bind focus to dropdown elements. Previously, the focus event tends to skip the first element within the dropdown list when the user presses the down arrow. Added a stopPropogation event for keydown handler within dropdown_list_widget which propoerly binds the focus event to the dropdown list items. --- static/js/dropdown_list_widget.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/dropdown_list_widget.js b/static/js/dropdown_list_widget.js index 0c124f7faa..fe4ec6736f 100644 --- a/static/js/dropdown_list_widget.js +++ b/static/js/dropdown_list_widget.js @@ -133,6 +133,7 @@ export const DropdownListWidget = function ({ return; } e.preventDefault(); + e.stopPropagation(); const custom_event = new $.Event("keydown.dropdown.data-api", { keyCode: e.keyCode, which: e.keyCode,