Steps to reproduce the problem:
Note:
Create two inputs with names and a console.log("Test Focus In" + element.getAttribute("name"))
and console.log("Test Blur" + element.getAttribute("name"))
in the focusin and blur event for each input.
Click the first element
Click the second element
Click the first element
Click outside chrome
Click the second element inside chrome.
What is the expected behavior?
LOG:
- Test Focus In FirstElement
- Test Blur FirstElement
- Test Focus In SecondElement
- Test Blur SecondElement
- Test Focus In FirstElement
- Test Blur FirstElement
- Test Focus In SecondElement
What went wrong?
BUT THIS HAPPEN LOG:
Test Focus In FirstElement
Test Blur FirstElement
- Test Focus In SecondElement
- Test Blur SecondElement
- Test Focus In FirstElement
- Test Blur FirstElement
Test Focus In FirstElement When entering the windows immediately trigger Focusin and blur for the last element before leaving the window.
Test Blur FirstElement
- Test Focus In SecondElement