ultimatedelman/autogrow

Textarea not resizing after form submitted

luizkowalski opened this issue · 5 comments

I have an Rails app with a remote form like this

<%= form_for Message.new, remote: true do |f| %>
   <%= hidden_field_tag "room_uid", @room.uid %>
   <%= f.text_area :content, class: "chat-text-field", autocomplete: "off", autofocus: true %>
 <% end %>

when I submit this form, after typed a long text, the textarea does not back to its initial size. I'm calling autogrow with $('.chat-text-field').autogrow(); and submiting the form with

$( ".chat-text-field" ).keypress(function(data) {
      if(data.charCode == 13 && !data.shiftKey){
        $('#new_message').submit()
      }
    });

can you create a reduced test case in jsfiddle or something?

I tried, but only happen inside a rails app
You can see it on http://usechathub.herokuapp.com

You're asking for a lot of permissions with your app. If you don't need them, you should probably scale it back. Are you seeing any console errors?

I just getting public informations and informations from private orgs
(also, just read org's name)
No, I don't see any console errors
On Wed Dec 17 2014 at 4:42:04 PM Jason Edelman notifications@github.com
wrote:

You're asking for a lot of permissions with your app. If you don't need
them, you should probably scale it back. Are you seeing any console errors?


Reply to this email directly or view it on GitHub
#20 (comment)
.

I removed some intrusive permissions.
Can you try again?