0👍
✅
Thank you, @yoduh
I got the answer.
I knew there should be some differences between when the user focus out the input normally, and when he tries to click on buttons.
the key, was the FocusEvent.relatedTarget
property. It should be defined in onblur
method. here is its full tutorial.
I defined a property named isFocus
and I change it in onBlur
method, only when I sure that the focus is not on the dropdown menu, by checking the relatedTarget
Source:stackexchange.com