...
|
...
|
@@ -12,6 +12,14 @@ import {api} from './store'; |
|
|
import {RatingView, LeaveMSGView, OrderListView } from './view';
|
|
|
import tip from 'plugin/tip';
|
|
|
|
|
|
window.requestAnimFrame = (function() {
|
|
|
return window.requestAnimationFrame ||
|
|
|
window.webkitRequestAnimationFrame ||
|
|
|
function(callback) {
|
|
|
window.setTimeout(callback, 1000 / 60);
|
|
|
};
|
|
|
}());
|
|
|
|
|
|
var qs = require('yoho-qs');
|
|
|
|
|
|
var socket = require('./socket-chat'),
|
...
|
...
|
@@ -168,17 +176,17 @@ var chat = { |
|
|
})
|
|
|
.on('focus.chat.sendText', '.text-in', function() {
|
|
|
$('.menu').hide();
|
|
|
// resizeFooter();
|
|
|
|
|
|
setTimeout(()=>{
|
|
|
window.requestAnimFrame(() => {
|
|
|
$('#chat-footer')[0].scrollIntoView();
|
|
|
}, 0);
|
|
|
});
|
|
|
})
|
|
|
.on('keydown.chat.sendText', '.text-in', function(event) {
|
|
|
event.stopPropagation();
|
|
|
setTimeout(()=>{
|
|
|
|
|
|
window.requestAnimFrame(() => {
|
|
|
$('#chat-footer')[0].scrollIntoView();
|
|
|
}, 0);
|
|
|
});
|
|
|
|
|
|
if (event.which === 13) {
|
|
|
let val = $.trim(event.target.value);
|
...
|
...
|
|