jquery-simply-countable icon indicating copy to clipboard operation
jquery-simply-countable copied to clipboard

counter doesn't update when control text is set using javascript

Open wkrick opened this issue 9 years ago • 0 comments

Currently, the counter only updates on keyup, blur, or paste events. So when you set the value using javascript, the counter doesn't change. My current workaround is to manually trigger a "blur" event after setting the value....

$('#myTextarea').val("some text"); // counter doesn't update $('#myTextarea'),blur(); // make counter recognize text change

I'm not sure if there's an easy solution to this issue that will work with all browsers, but I think it should be a future enhancement if it is possible.

wkrick avatar Aug 04 '15 22:08 wkrick