Textarea characters left doesnt work

softforge

Member
We have a form that sends a text message when it is submitted so this is a perfect opportunity to use the countdown feature of the textarea element.

However, it doesn't actually countdown although it does prevent you entering any more then the specified number of characters:

chars.png


I also tried switching it to words and it displays 1 less then the number of words you have specified. It also doesn't countdown the words or prevent you entering more words then specified:

words.png


I've had a look at the JS code but I cant see anything obviously wrong with it...
 
While we are at it, the truncate feature of the textarea element does not work properly either:

truncate.png


I have this set to only show 6 words but the HTML in the title tag is not being outputted correctly.
 
I was going to convince to that it did work... then I realised I was using a WYSIWYG editor on my element. :)

Looking now....
 
Code:
    this.periodFn = function () {
            
            // Seems that tinyMCE isn't created if FbLike element published in form
          //  if (typeof tinyMCE !== 'undefined') {
                if (this.getTextContainer() !== false) {
                    this.watchTextContainer();
                    clearInterval(this.periodFn);
                }
           // }
        };
Looks like a fairly recent change, it will work if you uncomment the 'if statement' within the textarea.js

I'm not too sure what the Facebook conflict was, need to speak to Rob.
 
i should have fixed this in github this morning, not quiet the same fix, as Felixcats suggestion would have reintroduced a different error but something similar :)
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top