Fixed more chars added even if maxlength limit is reached

Previously more chars were added into the fancyInput div, even if the maxlength limit was reached (and no more chars were added to the actual input form). Fixed that now.