mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Instantly clear the input
Avoids problems with rapid typing
This commit is contained in:
parent
d2ad9670b7
commit
583cbf2903
@ -428,17 +428,17 @@ consoleMock ?=
|
||||
# Finally free the fish
|
||||
@freeTheFish() if $('#timsChatInput').val().trim().toLowerCase() is '/free the fish'
|
||||
|
||||
text = $('#timsChatInput').val()
|
||||
$('#timsChatInput').val('').focus().keyup()
|
||||
$.ajax $('#timsChatForm').attr('action'),
|
||||
data:
|
||||
text: $('#timsChatInput').val(),
|
||||
text: text
|
||||
smilies: $('#timsChatSmilies').data('status')
|
||||
type: 'POST',
|
||||
beforeSend: (jqXHR) ->
|
||||
$('#timsChatInput').addClass 'ajaxLoad'
|
||||
success: $.proxy((data, textStatus, jqXHR) ->
|
||||
@getMessages()
|
||||
$('#timsChatInput').val('').focus()
|
||||
$('#timsChatInput').keyup()
|
||||
, @)
|
||||
complete: () ->
|
||||
$('#timsChatInput').removeClass 'ajaxLoad'
|
||||
|
Loading…
Reference in New Issue
Block a user