dev_new_shixunsrepository
杨树明 5 years ago
parent d39f9b3519
commit 4a37db2d73

@ -25,16 +25,16 @@ class MemoDetailKEEditor extends Component {
showEditor() {
$("html, body").animate({ scrollTop: $('#commentInput').offset().top - 100 }, 1000, () => {
if (this.keEditor) {
const FF = !(window.mozInnerScreenX == null);
if (FF) {
this.keEditor.focus()
} else {
this.keEditor.edit.win.document.body.focus()
}
}
});
// $("html, body").animate({ scrollTop: $('#commentInput').offset().top - 100 }, 1000, () => {
// if (this.keEditor) {
// const FF = !(window.mozInnerScreenX == null);
// if (FF) {
// this.keEditor.focus()
// } else {
// this.keEditor.edit.win.document.body.focus()
// }
// }
// });
}
render() {

@ -108,13 +108,13 @@ class MemoDetailMDEditor extends Component {
}
showEditor() {
$("html, body").animate({ scrollTop: $('.commentInput:visible').offset().top - 100 }, 1000, () => {
if (this.commentMDEditor) {
this.commentMDEditor.cm.focus()
} else {
this.onMockInputClick()
}
});
// $("html, body").animate({ scrollTop: $('.commentInput:visible').offset().top - 100 }, 1000, () => {
// if (this.commentMDEditor) {
// this.commentMDEditor.cm.focus()
// } else {
// this.onMockInputClick()
// }
// });
}
close = () => {
this.setState({isInited: false})

@ -96,13 +96,13 @@ class MemoDetailMDEditortwo extends Component {
}
showEditor() {
$("html, body").animate({ scrollTop: $('#commentInput').offset().top - 100 }, 1000, () => {
if (this.commentMDEditor) {
this.commentMDEditor.cm.focus()
} else {
$('#commentInput input')[0].click()
}
});
// $("html, body").animate({ scrollTop: $('#commentInput').offset().top - 100 }, 1000, () => {
// if (this.commentMDEditor) {
// this.commentMDEditor.cm.focus()
// } else {
// $('#commentInput input')[0].click()
// }
// });
}
onMockInputClick = () => {
this.setState({isInited: true})

Loading…
Cancel
Save