New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pasted text in can cause it to go over the max length #41
Comments
we are using v1.4.2. Didn't look like anything in the change log would suggest this was fixed in v1.5.0 |
ok, can you please try updating first and then create a fiddle to show the 2013/12/19 Drew Batshaw notifications@github.com
|
BTW, looks like I was using that latest version but the comment at the top on master still says v1.4.2 |
Here is a fiddle that reproduces it http://jsfiddle.net/Tr2nU/2/. On Chrome, I consistently see 603/600 when I do it. Just follow the instructions. |
I appears to me to be some how related to multiple new lines in the text (rather than being directly related to copy and paste). |
@drewB Newlines count as two characters with this plugin, but only 1 character by the browser, hence the inconsistencies. If your text has 10 lines, the browser will still cut off pasting after 600 characters, but bootstrap-maxlegnth will say it's 610 characters because it'll count the 10 lines twice. I've just come across this myself. I might spend some time on this and create a pull request to fix this, unless @mimo84 thinks that 2 characters per line is the intended behavior. |
I've created a Qunit test for this bug and fixed it in my fork. I've also removed the IgnoreBreaks flag, as you mentioned. I'll create a pull request now. |
We have noticed that sometimes when you paste text into the the text area it will go over the length by a few characters. It will show for example "603 of 600" and if you delete the 3 characters it will again enforce the limit. While we have not been able to reproduce it consistently it has been experienced by several people on our team.
The text was updated successfully, but these errors were encountered: