You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
Apologies in advance if this issue has been logged already or if it is not an issue, however if it is not I would like to know if there is a work around, business expects that on pasting a large text, the textarea control should auto grow. We have tested this out on the jquery mobile website from the iPad/iPhone/Android and see the same issue. One workaround I thought of was to access the click/tap event and force it to auto grow. How would one do that?
The text was updated successfully, but these errors were encountered:
Forcing the textarea to auto grow can be done with $( "textarea" ).keyup();.
The problem might be finding the right event to bind to, because I suppose you want the textarea to grow as soon as paste is clicked in the contextmenu. I don't think the "paste" event is supported on iOS and the "change" event most probably only fires after the textarea loses focus. Maybe "input" works. Here is some code you can test with:
Thank you, uGoMobi, unfortunately, that code broke the textarea autogrow, I included it in a simple script tag at the top of the page like so, I only replace dt he #mytextarea to a class I associated with the textareas on my page (my page is dynamically generated on pageshow)
I next tried it in my pageshow event, like so, but still no luck
// Handle the "page show" of the current page
$('#surveyPage').live('pageshow',
function () {
// jason call + knockout code
$(#surveyPage).on("input paste change", ".testTextarea", function () {
$(this).keyup();
});
});
I get an exception saying that the object has no "on" defined , so I am afraid, I have had no luck :(
Apologies in advance if this issue has been logged already or if it is not an issue, however if it is not I would like to know if there is a work around, business expects that on pasting a large text, the textarea control should auto grow. We have tested this out on the jquery mobile website from the iPad/iPhone/Android and see the same issue. One workaround I thought of was to access the click/tap event and force it to auto grow. How would one do that?
The text was updated successfully, but these errors were encountered: