Problem/Motivation
If this widget is applied to a textarea field in a paragraph, the counter gets printed twice (one working, one not) because of L40 in textfield_counter.js
When you inspect the results of the jQuery selection, it returns two items; the `textarea` and the containing `div` because they both have the class being selected applied to them.
Steps to reproduce
Create a textarea in a paragraph with the `textfield_counter` widget turned on.
Proposed resolution
Be more specific about what is being selected. For example:
$("." + fieldSettings.key[index]).not(".description").once("textfield-counter-text-watcher").once("textfield-counter-counter-watcher").each(function () {
// ...
});
// could be rewritten as
$("." + fieldSettings.key[index]).find("textarea, input[type=text]").once("textfield-counter-text-watcher").once("textfield-counter-counter-watcher").each(function () {
// ...
});
Since the code in `.each` specifically has ties to an actual input element, it may be wise to specifically target those only, so that any other element that may share that class won't get picked up.
It should also continue to prevent duplicate counters caused by description, since that should never match.