How about this ...
var select = document.getElementById('your-element'), changed = false; select.onchange = function() { changed = true; console.log('Picked something new.'); } select.onfocus = function() { changed = false; } select.onblur = function() { if (!changed) { select.onStayTheSame.call(); } changed = false; } select.onStayTheSame = function() { console.log('Stayed the same.'); }
Take a look at jsFiddle .
He has a few questions, but hopefully this is a good start :)
source share