mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-05 11:10:03 +08:00
Fix error when scrolling dropdown with scrollbar (#5839)
* Fix error when scrolling dropdown with scrollbar * added comment * add changeset --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
1d5b15a2d2
commit
b83064da00
6
.changeset/dry-comics-lick.md
Normal file
6
.changeset/dry-comics-lick.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@gradio/dropdown": patch
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Fix error when scrolling dropdown with scrollbar
|
@ -117,6 +117,11 @@
|
||||
|
||||
function handle_option_selected(e: any): void {
|
||||
selected_index = parseInt(e.detail.target.dataset.index);
|
||||
if (isNaN(selected_index)) {
|
||||
// This is the case when the user clicks on the scrollbar
|
||||
selected_index = null;
|
||||
return;
|
||||
}
|
||||
show_options = false;
|
||||
active_index = null;
|
||||
filter_input.blur();
|
||||
|
Loading…
Reference in New Issue
Block a user