fix(combo-box): focus input if related target attribute is not "searchbox"

This commit is contained in:
Eric Liu 2020-12-05 11:28:47 -08:00
commit c6c37adc15

View file

@ -222,8 +222,8 @@
on:focus
on:blur
on:blur="{({ relatedTarget }) => {
if (!open) return;
if (relatedTarget && relatedTarget.getAttribute('role') !== 'button') {
if (!open || !relatedTarget) return;
if (relatedTarget.getAttribute('role') !== 'button' && relatedTarget.getAttribute('role') !== 'searchbox') {
ref.focus();
}
}}"