The issue was that when user click on the control the 1st time, both widow.focus and control.click are fired.
window.focus is called first which toggles ON the control, then control.click is fired which toggles OFF.
The click event is roughly fired after 200-300ms after window.focus, so I am setting a timeout of 500ms just to be safe
The issue was that when user click on the control the 1st time, both widow.focus and control.click are fired. window.focus is called first which toggles ON the control, then control.click is fired which toggles OFF. The click event is roughly fired after 200-300ms after window.focus, so I am setting a timeout of 500ms just to be safe