fix remark 软键盘导致remark确定失效

luoyang 5 years ago
parent 5af22be3b3
commit 9bae7ca6cc

@ -236,6 +236,12 @@ $(function () {
} }
}); });
function addBlurListen() {
$('.remark-input').on('blur', function (event) {
window.scrollTo(0, 0);
});
}
$('#key_P').bind('touchstart', function () { $('#key_P').bind('touchstart', function () {
if (window.requireRemark) { if (window.requireRemark) {
if (!dataCache.remark) { if (!dataCache.remark) {
@ -387,7 +393,7 @@ $(function () {
var yes = $('<a></a>', { var yes = $('<a></a>', {
class: 'weui_btn_dialog primary', class: 'weui_btn_dialog primary',
text: 'OK', text: 'OK',
style: 'background: #0bb20c;color: #fff;' style: 'background: #0bb20c;color: #fff;border: 5px black solid;'
}).appendTo(ft); }).appendTo(ft);
yes.click(function () { yes.click(function () {
config.confirm(dialog, true); config.confirm(dialog, true);
@ -436,6 +442,7 @@ $(function () {
} }
} }
dialog.appendTo($('body')); dialog.appendTo($('body'));
addBlurListen();
} }
} }

Loading…
Cancel
Save