diff --git a/public/react/src/modules/comment/CommentItemMDEditor.js b/public/react/src/modules/comment/CommentItemMDEditor.js index d03a91ac2..4958f1036 100644 --- a/public/react/src/modules/comment/CommentItemMDEditor.js +++ b/public/react/src/modules/comment/CommentItemMDEditor.js @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import { getUploadActionUrl } from 'educoder'; -import './CommentItemMDEditor.css' +import './CommentItemMDEditor.css'; + class CommentItemMDEditor extends Component { diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index d88932e9f..92a25547e 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -1,8 +1,8 @@ import React, { Component } from 'react'; -import { getUploadActionUrl } from 'educoder' +import { getUploadActionUrl } from 'educoder'; -import './MemoDetailEditor.css' +import './MemoDetailEditor.css'; const $ = window.$; @@ -109,6 +109,7 @@ class MemoDetailMDEditor extends Component { } showEditor() { +<<<<<<< HEAD $("html, body").animate({ scrollTop: $('.commentInput:visible').offset().top - 100 }, 1000, () => { if (this.commentMDEditor) { this.commentMDEditor.cm.focus() @@ -116,6 +117,15 @@ class MemoDetailMDEditor extends Component { this.onMockInputClick() } }); +======= + // $("html, body").animate({ scrollTop: $('.commentInput:visible').offset().top - 100 }, 1000, () => { + // if (this.commentMDEditor) { + // this.commentMDEditor.cm.focus() + // } else { + // this.onMockInputClick() + // } + // }); +>>>>>>> f8dfb5f... 调整 } close = () => { this.setState({ isInited: false }) diff --git a/public/react/src/modules/forums/MemoDetailMDEditortwo.js b/public/react/src/modules/forums/MemoDetailMDEditortwo.js index 51512e303..f308123c9 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditortwo.js +++ b/public/react/src/modules/forums/MemoDetailMDEditortwo.js @@ -1,6 +1,8 @@ import React, { Component } from 'react'; -import { getUploadActionUrl } from 'educoder' -import './MemoDetailEditor.css' + +import { getUploadActionUrl } from 'educoder'; + +import './MemoDetailEditor.css'; const $ = window.$; ///作业回答 专用 @@ -87,13 +89,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 })