daxelrod The 2nd comment above led me to the solution: drag the mousedown event onto the bright icon, stop it and clear the input. Thus, click never occurs, and the input does not lose focus.
I thought that blur () shot at the browser level before any mouse events (down, up, click), so I did not think to try. Glad to see that I was wrong!
In Mootools JS Flavored:
document.id('inputClearImage').addEvent('mousedown', function (e) { e.stop(); document.id('input').set('value', ''); });
source share