Unhandled Runtime Error : "NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. Caused by Button in the AuthForm component
Error shows up when button attribute isLoading={isLoading} , and we click the button text content then (setLoading is triggered and spinner should showup in place of a text node):
<Button
type="submit"
bg="green.500"
isLoading={isLoading}
sx={{
'&:hover': {
bg: 'green.300',
},
}}
>
{mode}
</Button>
<Button
type="submit"
bg="green.600"
isLoading={isLoading}
loadingText="loading..."
sx={{
"&:hover": {
bg: "green.400"
}
}}
>
Submit
</Button>
No errors with:
- Button works correctly when we click area outside the button text.
- The lack of the text as a child doesn't produce any errors:
<Button
type="submit"
bg="green.600"
isLoading={isLoading}
loadingText="loading..."
sx={{
"&:hover": {
bg: "green.400"
}
}}
>
</Button>
- The button doesn't cause an error when a child is another react component (not a text node):
<Button
type="submit"
bg="green.600"
isLoading={isLoading}
loadingText="loading..."
sx={{
"&:hover": {
bg: "green.400"
}
}}
>
<Text>{mode}</Text>
</Button>
- no issues when isLoading is set to false
Unhandled Runtime Error : "NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. Caused by Button in the AuthForm component
Error shows up when button attribute
isLoading={isLoading}, and we click the button text content then (setLoading is triggered and spinner should showup in place of a text node):No errors with: