Character counter in textarea fields repeats many times


Topic: Character counter in textarea fields repeats many times

sergiojaviercaz pro premium asked 3 years ago

Expected behavior Typed and remaining available characters are displayed as text is typed into the textarea field

Actual behavior Typed and remaining available characters are displayed many times below the textarea field. First and Last occurence display dynamically the remaining characters to type. The middle occurence shows always zero characters typed

See how the counters are displayed three times

In this case, the form is within a modal.


Dawid Wajszczuk staff commented 3 years ago

Hi. Can you share the code with this issue by providing a snippet https://mdbootstrap.com/snippets/?


sergiojaviercaz pro premium answered 3 years ago

Well, the code is posted at https://mdbootstrap.com/snippets/standard/sergiojaviercaz/3702549 Thanks !


Dawid Wajszczuk staff commented 3 years ago

Are you sure there is no other piece of code responsible for this form? Because I can't reproduce your issue. Everything looks fine https://mdbootstrap.com/snippets/standard/d-wajszczuk/3705567. Do you use the latest (3.10.2) version of MDB? Maybe there are some steps to that I need to take in order to see this problem?


sergiojaviercaz pro premium commented 3 years ago

The only other code involved is a js (jquery) script from which the modal is opened. $("#messageMLModal").modal(); If it gives you a clue, I see that if I open the same modal many times, instead of appearing 3 times, the character counter appears 6, 9, 12 times, that's multiplying by 3 each time the modal is opened.


sergiojaviercaz pro premium commented 3 years ago

Version currently used is: PRO 3.3.0.


Dawid Wajszczuk staff answered 3 years ago

Hi,

I have checked it and we have already fixed this issue in release 3.6.0. So you have to update your MDB package to at least 3.6.0 and the issue will be gone. Of course I advise you to update to the latest 3.10.2 :)

Keep coding,
Dawid


sergiojaviercaz pro premium commented 3 years ago

Thanks Dawid. Is there a procedure to safely upgrade MDB to 3.10.2 without affecting the whole project?


Dawid Wajszczuk staff commented 3 years ago

Here you have the list of changes https://mdbootstrap.com/docs/standard/getting-started/changelog/. There was no major update with braking changes, so the update is as easy as replacing old MDB files with new ones. Keep coding :)


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.10.2
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No