agical / friendsunhosted

FRIENDS#UNHOSTED - Own your network!
http://friendsunhosted.com/
Other
13 stars 2 forks source link

Ctrl+Enter to submit #49

Closed codification closed 12 years ago

codification commented 12 years ago

I think it is annoying to have to use the mouse or Tab+Space or Tab+Enter to submit when I write. I would much prefer to have something like Ctrl+Enter (in a textarea) submit status updates and comments.

I have made a stab at implementing this by binding a knockout event handler (for keypress) to the statusUpdate text area. Should work the same for comments.

Any opinions on what key combo to use? I kind of like being able to use Enter for writing long paragraphs, that is why I suggest Ctrl+Enter.

codification commented 12 years ago

Assigned myself as I have already started looking at it.

jancborchardt commented 12 years ago

Good point. This is how Github does it also.

brolund commented 12 years ago

I did not follow my own rule and I commented on the FUn site instead of here.

The hint text in the text field should say something like

Your comment (Ctrl+Enter to submit)

codification commented 12 years ago

My implementation of this has been pushed to the develop branch now.

brolund commented 12 years ago

I couldn't get it to work at first, but after some debugging I found that in my browser the enter code was 10 (LF) so I added that. Please check it out. I'll close this. And the next time I'll try to remember to add the issue nr in the git comment. :-)