Workaround for bug 1317 '"What's up" textarea on iPhone missing proper submit button' http://laconi.ca/trac/ticket/1317
Workaround for bug 1317 '"What's up" textarea on iPhone missing proper submit button'
http://laconi.ca/trac/ticket/1317

Mobile Safari shows a 'return' button for making newlines in a <textarea> where it would show a submit button for plain <input> text fields...
However there's a keydown event handler which is supposed to detect hitting enter and submit the form for us. This didn't work on Mobile Safari because it was checking of 13 ("\r") but the iPhone sends us char 10 ("\n") here. Changed to accept both, so we now submit on hitting 'return' on iPhone.

Note: I also added a blur() to move focus out of the textarea, which closes the on-screen keyboard. It will also take focus out of the textarea on other platforms, but this is probably the right thing -- the same thing happens when you push the "send" button after all.

Also note: unfortunately the layout right now looks pretty awful generally while editing on the iPhone; you can't see the send button or character counter while typing at the default zoom, and it doesn't zoom out after you submit so you can't really see where your message is going. This should be dealt with in general by fixing up the mobile skin variant...

faulteh/gnu-social,eXcomm/gnu-social,znarf/statusnet-ladistribution,zcopley/StatusNet,charnimda/lgbtpzn-social,shashi/StatusNet,zcopley/StatusNet,sikevux/bsk-social,minmb/statusnet,d3vgru/StatusNet,charlycoste/StatusNet,sikevux/bsk-social,d3vgru/StatusNet,zcopley/zcopleys-statusnet-clone,studio666/gnu-social,UngPirat/freesocial,gnusocial/mainline,foocorp/gnu-social,zh/statusnet,charnimda/lgbtpzn-social,zcopley/zcopleys-statusnet-clone,bankonme/gnu-social,UngPirat/freesocial,furtherfield/gnu-social,csarven/statusnet,zcopley/StatusNet,chimo/social,xebia/statusnet-oauth2,xebia/statusnet-oauth2,faulteh/gnu-social,UngPirat/freesocial,Piratas/tortuga,foocorp/gnu-social,gnusocial/mainline,chimo/social,brion/StatusNet,foocorp/gnu-social,gnusocial/mainline,faulteh/gnu-social,bankonme/gnu-social,faulteh/gnu-social,znarf/statusnet-ladistribution,zh/statusnet,zh/statusnet,bankonme/gnu-social,d3vgru/StatusNet,gnusocial/mainline,minmb/statusnet,brion/StatusNet,shashi/StatusNet,xebia/statusnet-oauth2,Piratas/tortuga,Piratas/tortuga,brion/StatusNet,shashi/StatusNet,charlycoste/StatusNet,studio666/gnu-social,sikevux/bsk-social,eXcomm/gnu-social,csarven/statusnet,charnimda/lgbtpzn-social,chimo/social,eXcomm/gnu-social,sikevux/bsk-social,csarven/statusnet,furtherfield/gnu-social,furtherfield/gnu-social,Piratas/tortuga,charlycoste/StatusNet,furtherfield/gnu-social,bankonme/gnu-social,studio666/gnu-social,csarven/statusnet,studio666/gnu-social,zcopley/zcopleys-statusnet-clone,minmb/statusnet,znarf/statusnet-ladistribution,eXcomm/gnu-social