fix clearMaskOnLostFocus + added unittest