Fix areYouSure confirm (#32941)

See the comment
This commit is contained in:
wxiaoguang authored and GitHub committed 2024-12-21 12:11:22 -05:00
1 parent 23687a0a71
commit 09a0041965
4 files changed
+12 -4

No files matched your search

+6
View File
@@ -204,3 +204,9 @@ export function applyAreYouSure(selectorOrEl: string|Element|$, opts = {}) {
export function reinitializeAreYouSure(selectorOrEl: string|Element|$) {
$(selectorOrEl).trigger('reinitialize.areYouSure');
}
export function ignoreAreYouSure(selectorOrEl: string|Element|$) {
// here we should only add "ignore-dirty" but not remove "dirty".
// because when using "enter" to submit a form, the "dirty" class will appear again before reloading.
$(selectorOrEl).addClass('ignore-dirty');
}