The problem (as you know) is that the clear icon is getting removed before its click event is fired when you focus-out from the text-box. One possible solution is altering the opacity of the clear icon instead of removing it, so that it still continues to receive events.
Demo: http://jsfiddle.net/w9RbW/10/
// Have the clear icon in there all the time
$("<span class='keypress'><i class='icon-remove-sign'></i></span>").appendTo($(".searchInput").parent());
$(".keypress").click(function(e) {
if($(this).css('opacity') == 0) return;
$(".searchInput").val("").focus();
$(this).css('opacity', '0'); // hide it after clearing the text
})
// focusout
$(".searchInput").blur(function(e) {
$(".keypress").css('opacity', '0'); // hide it on blur
})
$(".searchInput").focus(function() {
if ($(".searchInput").val() != "") {
$(".keypress").css('opacity', '1'); // show it
}
})
$(".searchInput").keyup(function() {
if($(this).val() != "") {
$(".keypress").css('opacity', '1');
} else {
$(".keypress").css('opacity', '0');
}
})