Prevent unload when Recaptcha is open
This commit is contained in:
parent
47e6675cd1
commit
704167db6b
3 changed files with 11 additions and 2 deletions
|
@ -10,6 +10,7 @@ import descriptionComponent from './description.vue';
|
||||||
import editedComponent from './edited.vue';
|
import editedComponent from './edited.vue';
|
||||||
import formComponent from './form.vue';
|
import formComponent from './form.vue';
|
||||||
import recaptchaModalImplementor from '../../vue_shared/mixins/recaptcha_modal_implementor';
|
import recaptchaModalImplementor from '../../vue_shared/mixins/recaptcha_modal_implementor';
|
||||||
|
import { __ } from '~/locale';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -201,8 +202,8 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
handleBeforeUnloadEvent(e) {
|
handleBeforeUnloadEvent(e) {
|
||||||
const event = e;
|
const event = e;
|
||||||
if (this.showForm && this.issueChanged) {
|
if (this.showForm && this.issueChanged && !this.showRecaptcha) {
|
||||||
event.returnValue = 'Are you sure you want to lose your issue information?';
|
event.returnValue = __('Are you sure you want to lose your issue information?');
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
},
|
},
|
||||||
|
|
5
changelogs/unreleased/44698-recaptcha.yml
Normal file
5
changelogs/unreleased/44698-recaptcha.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Prevent unload when Recaptcha is open
|
||||||
|
merge_request: 24625
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -714,6 +714,9 @@ msgstr ""
|
||||||
msgid "Are you sure you want to lose unsaved changes?"
|
msgid "Are you sure you want to lose unsaved changes?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Are you sure you want to lose your issue information?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Are you sure you want to regenerate the public key? You will have to update the public key on the remote server before mirroring will work again."
|
msgid "Are you sure you want to regenerate the public key? You will have to update the public key on the remote server before mirroring will work again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue