Skip to content

Commit

Permalink
dropdown_list_widget: Bind Escape key handler to close dropdown.
Browse files Browse the repository at this point in the history
In commit 0d20a20, we missed out the "Escape" keyhandler
which is required to handle scenario where a user wants
to close the dropdown using "Escape" key.

This commit essentially handles the above case, which
enables the functionality to close dropdown using
"Esc" keyboard button.
  • Loading branch information
aryanshridhar authored and andersk committed Apr 28, 2022
1 parent 04d1f2c commit a1fb68b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions static/js/dropdown_list_widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ export class DropdownListWidget {
}
break;
}
case "Escape": {
$dropdown_menu.dropdown("toggle");
break;
}
}
});
}
Expand Down

0 comments on commit a1fb68b

Please sign in to comment.