mirror of https://github.com/go-gitea/gitea.git
Adjust js code
This commit is contained in:
parent
64cffdd62e
commit
c552d09a57
|
@ -185,7 +185,7 @@ export function initRepoIssueCommentEdit() {
|
|||
editor = await handleReply($replyBtn);
|
||||
} else {
|
||||
// for normal issue/comment page
|
||||
editor = getComboMarkdownEditor($('#comment-form .combo-markdown-editor'));
|
||||
editor = getComboMarkdownEditor(document.querySelector('#comment-form .combo-markdown-editor'));
|
||||
}
|
||||
if (editor) {
|
||||
if (editor.value()) {
|
||||
|
|
|
@ -414,7 +414,7 @@ export async function handleReply($el) {
|
|||
showElem($form);
|
||||
|
||||
const $textarea = $form.find('textarea');
|
||||
let editor = getComboMarkdownEditor($textarea);
|
||||
let editor = getComboMarkdownEditor($textarea[0]);
|
||||
if (!editor) {
|
||||
// FIXME: the initialization of the dropzone is not consistent.
|
||||
// When the page is loaded, the dropzone is initialized by initGlobalDropzone, but the editor is not initialized.
|
||||
|
|
|
@ -260,7 +260,6 @@ export function isElemVisible(element) {
|
|||
}
|
||||
|
||||
export function getComboMarkdownEditor(el) {
|
||||
if (el?.jquery) el = el[0];
|
||||
return el?._giteaComboMarkdownEditor;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue