mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Fix uncaught TypeError in Safari 8
jQuery's “.focus()” returns undefined in Safari 8, thus the following error will be thrown and sending of messages is impossible: “Uncaught TypeError: Cannot read property 'change' of undefined”
This commit is contained in:
parent
dc56c5a152
commit
a9c2e4fe30
@ -190,7 +190,10 @@ and afterwards sent to the server by an AJAX request.
|
||||
do event.preventDefault
|
||||
|
||||
text = do $('#timsChatInput').val().trim
|
||||
$('#timsChatInput').val('').focus().change()
|
||||
input = $ '#timsChatInput'
|
||||
input.val ''
|
||||
do input.focus
|
||||
do input.change
|
||||
|
||||
return false if text.length is 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user