blur() does not work programmatically | but does when initiated from the user
javascript
Solution
Needs to have focus first.
input_title.focus();
input_title.blur();
...
Problem
This works in clearing in input after a user submits it via ajax on a single input form. ``` var tweet_input = document.getElementById( 'tweet_input' ); tweet_input.value=''; tweet_input.blur(); ``` However on a 3 input field orm this does not: ``` var input_url = document.getElementById( 'bookmark_input_url' ); input_url.value=''; var input_title = document.getElementById( 'bookmark_input_title' ); input_title.value=''; var input_tag = document.getElementById( 'bookmark_input_tag' ); input_tag.value=''; input_title.blur(); input_url.blur(); input_tag.blur(); ``` Only the last element is actually blurred. Not sure what is going on here with the other two or how to troubleshoot. Basically I have Event Listeners that fire on a blur(), they work fine on an actual user blur(), but when I try to initiate them programmatically only one works.