Skip to content

Commit daaa38e

Browse files
committed
Prevent disabled item from being committed
1 parent 91b04e2 commit daaa38e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

combobox-nav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function commitWithElement(event: MouseEvent) {
6969

7070
function commit(input: HTMLTextAreaElement | HTMLInputElement, list: HTMLElement): boolean {
7171
const target = list.querySelector('[aria-selected="true"]')
72-
if (!target) return false
72+
if (!target || target.getAttribute('aria-disabled') === 'true') return false
7373
fireCommitEvent(target)
7474
return true
7575
}

0 commit comments

Comments
 (0)