refactor: replace jquery.are-you-sure with first-party code (#39233)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind
2026-09-06 14:43:49 +08:00
committed by GitHub
co-authored by wxiaoguang
parent 3bd7ea4c9f
commit 7c280c0ce6
14 changed files with 180 additions and 265 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ export async function createCodeEditor(textarea: HTMLTextAreaElement, filenameIn
cm.view.EditorView.updateListener.of((update: ViewUpdate) => {
if (update.docChanged) {
textarea.value = update.state.doc.toString();
textarea.dispatchEvent(new Event('change')); // needed for jquery-are-you-sure
textarea.dispatchEvent(new Event('change', {bubbles: true})); // for the areYouSure dirty tracking
}
}),
],