check in fix for #586

Added keyup monitor in order to add or remove the X button based on the number of characters.