summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2019-01-28 12:11:30 +0000
committerKushal Pandya <kushalspandya@gmail.com>2019-01-28 12:11:30 +0000
commit2bb0d089ad70bf633071fc79dda0cc745a1c02a3 (patch)
treed05a1a916c58b44a527a466f1be615c5b917a9e5 /app
parent6b67eb5bff72bfb6441a74571b9e37e553ff843a (diff)
parent704167db6b4111061b07ee4fee140f8a0ebd0f25 (diff)
downloadgitlab-ce-2bb0d089ad70bf633071fc79dda0cc745a1c02a3.tar.gz
Merge branch '44698-recaptcha' into 'master'
Prevent unload when Recaptcha is open Closes #44698 See merge request gitlab-org/gitlab-ce!24625
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/issue_show/components/app.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/issue_show/components/app.vue b/app/assets/javascripts/issue_show/components/app.vue
index e4e2eab2acd..cd569eb3045 100644
--- a/app/assets/javascripts/issue_show/components/app.vue
+++ b/app/assets/javascripts/issue_show/components/app.vue
@@ -10,6 +10,7 @@ import descriptionComponent from './description.vue';
import editedComponent from './edited.vue';
import formComponent from './form.vue';
import recaptchaModalImplementor from '../../vue_shared/mixins/recaptcha_modal_implementor';
+import { __ } from '~/locale';
export default {
components: {
@@ -201,8 +202,8 @@ export default {
methods: {
handleBeforeUnloadEvent(e) {
const event = e;
- if (this.showForm && this.issueChanged) {
- event.returnValue = 'Are you sure you want to lose your issue information?';
+ if (this.showForm && this.issueChanged && !this.showRecaptcha) {
+ event.returnValue = __('Are you sure you want to lose your issue information?');
}
return undefined;
},