What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

enter image description here

If a chat message does not get sent for some reason, there's a "retry/cancel" linkset attached to it. Clicking it works wonders. It also deletes whatever you've typed in the chatbox.

By the time the "message failed" thingy pops up, I've already half-typed the next message. I click the retry button, and it gets sent--but then I have to type my message all over again. It's pretty unexpected behaviour--I can understand that pressing the up arrow will empty the box (since nearly all of us have used a shell at one point or the other), but not this.

This has happened to me often--my ISP is rather evil so the retry thingy comes often.

I can guess what's happening here--the retry button is hijacking the textarea to send the message--it's probably just recopying the text into the textarea and jQuery-voodoo-clicking "send".

Could this be tweaked so that it saves the typed text before hijacking the textarea and places the text back in place? Even better would be if it preserves the cursor. The best thing to do would be to make it not hijack the textarea in the first place.

share|improve this question
    
yeah, this can be annoying. Thankfully for me, Lazarus had saved me from quite a lot of frustration. –  Sathya Apr 11 '12 at 5:56
add comment

1 Answer

up vote 4 down vote accepted

I can guess what's happening here--the retry button is hijacking the textarea to send the message--it's probably just recopying the text into the textarea and jQuery-voodoo-clicking "send".

I have to admit you had almost convinced me that that's what we do, but we actually don't :)

The issue was just that the "submit an edit to a previous message", "submit a new message", and "re-submit a failed message" are using the same functionality (Code reuse! DRY! Awesome, right?).

Part of that code was to clear the input box, which of course makes sense in two of those three use cases. After you've pulled yourself some freshly baked JavaScript, it won't do it anymore in the third case.

share|improve this answer
    
Nearly the same as the textarea thing--just without the voodoo :) Thanks for fixing it! –  Manishearth Apr 11 '12 at 7:40
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .