work around event.relatedTarget not being available sometimes
This commit is contained in:
parent
1e5699ef92
commit
77f9154048
1 changed files with 2 additions and 2 deletions
|
@ -21,8 +21,8 @@ export const field = (validator, chill) => {
|
|||
};
|
||||
|
||||
const action = (node) => {
|
||||
const on_blur = (event) => {
|
||||
if (!node.contains(event.relatedTarget)) {
|
||||
const on_blur = async (event) => {
|
||||
if (!node.contains(event.relatedTarget || await new Promise((res) => setTimeout(() => res(document.activeElement), 100)))) {
|
||||
validate();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue