When I click the buttons on a timeline, my browser(chrome) doesn't focus the button. The focus was stay on the element where it was. How do they do that?
These are what I found.
- They don't use
blur()
function on click. If they call the method, the preexisting focus would disappear. - It seems they don't save previous focused element, and refocus it. When I overrided
$.fn.focus
method, it wasn't called. - They use some trick with JavaScript. When I disabled JavaScript, I managed to focus the element by clicking the buttons.