Skip to content

Commit 11b416c

Browse files
save file
1 parent ef13863 commit 11b416c

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

html/chat-room/html/chat-room-open/chat-room-open.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,13 @@
157157

158158
btn.send = function(){
159159

160-
$(shadow,'#txt').focus();
160+
var txt = $(shadow,'#txt').value;
161+
var ts = display.last;
161162

162-
var txt = $(shadow,'#txt').value;
163-
$(shadow,'#txt').value = '';
163+
send.msg({txt,ts});
164164

165-
msg.send({username,password,txt});
165+
$(shadow,'#txt').value = '';
166+
$(shadow,'#txt').focus();
166167

167168
}//send
168169

@@ -248,12 +249,10 @@
248249
//:
249250

250251

251-
send.msg = async function({}){
252+
send.msg = async function({txt,ts}){
252253
//console.log('post.msg');
253-
var ts = display.last;
254254
var result = await post('open/msg',{room_id,txt,ts});
255255
if(!result)return;
256-
257256
display.result(result);
258257

259258
}//send

0 commit comments

Comments
 (0)