mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix(multi-select): MultiSelect should correctly lose focus (#1077)
Currently, opening a MultiSelect and then clicking an interactive target will cause the MultiSelect to retain focus. This removes the logic that interferes with native blurring behavior.
This commit is contained in:
parent
989e0f4c65
commit
8b39ccae89
1 changed files with 0 additions and 22 deletions
|
@ -337,16 +337,6 @@
|
||||||
if (inputRef) inputRef.focus();
|
if (inputRef) inputRef.focus();
|
||||||
}
|
}
|
||||||
}}"
|
}}"
|
||||||
on:blur="{({ relatedTarget }) => {
|
|
||||||
if (
|
|
||||||
relatedTarget &&
|
|
||||||
!['INPUT', 'SELECT', 'TEXTAREA'].includes(relatedTarget.tagName) &&
|
|
||||||
relatedTarget.getAttribute('role') !== 'button' &&
|
|
||||||
relatedTarget.getAttribute('role') !== 'searchbox'
|
|
||||||
) {
|
|
||||||
fieldRef.focus();
|
|
||||||
}
|
|
||||||
}}"
|
|
||||||
id="{id}"
|
id="{id}"
|
||||||
disabled="{disabled}"
|
disabled="{disabled}"
|
||||||
translateWithId="{translateWithId}"
|
translateWithId="{translateWithId}"
|
||||||
|
@ -421,18 +411,6 @@
|
||||||
on:keyup
|
on:keyup
|
||||||
on:focus
|
on:focus
|
||||||
on:blur
|
on:blur
|
||||||
on:blur="{({ relatedTarget }) => {
|
|
||||||
if (
|
|
||||||
relatedTarget &&
|
|
||||||
!['INPUT', 'SELECT', 'TEXTAREA'].includes(
|
|
||||||
relatedTarget.tagName
|
|
||||||
) &&
|
|
||||||
relatedTarget.getAttribute('role') !== 'button' &&
|
|
||||||
relatedTarget.getAttribute('role') !== 'searchbox'
|
|
||||||
) {
|
|
||||||
inputRef.focus();
|
|
||||||
}
|
|
||||||
}}"
|
|
||||||
disabled="{disabled}"
|
disabled="{disabled}"
|
||||||
placeholder="{placeholder}"
|
placeholder="{placeholder}"
|
||||||
id="{id}"
|
id="{id}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue