progress.js icon indicating copy to clipboard operation
progress.js copied to clipboard

Make the character-limited textarea more intuitive

Open ConnorKrammer opened this issue 11 years ago • 2 comments

This solves the problem raised in issue #5. Namely, it:

  • Prevents input from exceeding the textarea limit when holding down a key
  • Prevents pasting text that would exceed the textarea limit
  • Updates the progress bar even when holding down a key

The solution is cross-browser, though very old browsers might not work with it. This should also fix issue #1.

Review welcome.

ConnorKrammer avatar Apr 05 '14 22:04 ConnorKrammer

That's a ton of changes @ConnorKrammer! Could you please provide an online example?

afshinm avatar Jul 17 '14 15:07 afshinm

I just looked back on this and realized I could have done this much more simply, so I've updated it accordingly. That's cut down on the changes by a lot.

If you want to see the changes in action, open up my fork's demo page. Keep in mind that I made no changes to progress.js itself, just the demo.

Let me know if there's anything to fix.

ConnorKrammer avatar Jul 17 '14 19:07 ConnorKrammer