materialize icon indicating copy to clipboard operation
materialize copied to clipboard

The character counter span is displayed twice.

Open harrinsonmb opened this issue 11 years ago • 3 comments

There is an error with the funcionality characterCounter(), the label is displayed twice.

Here is an example of what I'm talking about: https://jsfiddle.net/g90b8qn7/

harrinsonmb avatar Aug 17 '15 16:08 harrinsonmb

As described in http://materializecss.com/forms.html#character-counter , you only need to add the javascript initialisation if adding the input dynamically. So, it will work correctly if you remove the manual $('input#input_text, textarea#textarea1').characterCounter();.

carlosperate avatar Aug 17 '15 16:08 carlosperate

oh, you're right! I'm sorry :9

harrinsonmb avatar Aug 17 '15 16:08 harrinsonmb

I don't have the js initialized but span is showing 3x. Below is the only reference to the character counter. I DO have a validation in my model, but this shouldn't cause the js to show 3x. = f.text_field :text, length: 120

alexwasik avatar Nov 12 '15 17:11 alexwasik