Skip to content

Conversation

JamesSkemp
Copy link

If adding a counter to multiple fields, with each having a different maxlength, the limit on the last counter on the page will be used for all other counters. This stores the limit on the respective counter instead.

If adding a counter to multiple fields, with each having a different maxlength, the limit on the last counter on the page will be used for all other counters. This stores the limit on the respective counter instead.
@JamesSkemp
Copy link
Author

This is my first attempt at a pull request, so please be gentle :)

This is related to #10.

While it seemed to work, once I started typing into a field I found that the maximum length had been set to whatever was set on the last field on the page (options.limit is updated for each field, with the last having the final say).

This stores the length on the counter element itself instead, which is then checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant