diff options
author | Rajat Jain <rjain@gitlab.com> | 2019-01-24 14:02:32 +0530 |
---|---|---|
committer | Rajat Jain <rjain@gitlab.com> | 2019-01-28 16:59:03 +0530 |
commit | 704167db6b4111061b07ee4fee140f8a0ebd0f25 (patch) | |
tree | dbdd05d465eeefc837b10ee013e593fda229cda8 /app/assets | |
parent | 47e6675cd116e2c171c0f867b049ef7401a8d6e2 (diff) | |
download | gitlab-ce-704167db6b4111061b07ee4fee140f8a0ebd0f25.tar.gz |
Prevent unload when Recaptcha is open
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/issue_show/components/app.vue | 5 |
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; }, |