Fix areYouSure confirm (#32941)

See the comment
This commit is contained in:
wxiaoguang 2024-12-22 01:11:22 +08:00 committed by GitHub
parent 23687a0a71
commit 09a0041965
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 12 additions and 4 deletions

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');
}