Commit bcd265ee authored by Justin Ho Tuan Duong's avatar Justin Ho Tuan Duong Committed by Kushal Pandya

Fix Save button CSS not updating on Safari

The additional timeout gives the browser some time to
update the CSS before submitting the form. Without it,
Safari does not apply the "disabled" style to the button
and still applying the primary success color.
parent 12f8692c
......@@ -59,9 +59,6 @@ export default {
showReset() {
return this.isInstanceOrGroupLevel && this.propsSource.resetPath;
},
saveButtonKey() {
return `save-button-${this.isDisabled}`;
},
},
methods: {
...mapActions([
......@@ -120,7 +117,6 @@ export default {
<div v-if="isEditable" class="footer-block row-content-block">
<template v-if="isInstanceOrGroupLevel">
<gl-button
:key="saveButtonKey"
v-gl-modal.confirmSaveIntegration
category="primary"
variant="success"
......@@ -134,7 +130,6 @@ export default {
</template>
<gl-button
v-else
:key="saveButtonKey"
category="primary"
variant="success"
type="submit"
......
import $ from 'jquery';
import { delay } from 'lodash';
import axios from '../lib/utils/axios_utils';
import { __, s__ } from '~/locale';
import toast from '~/vue_shared/plugins/global_toast';
......@@ -43,7 +44,9 @@ export default class IntegrationSettingsForm {
const formValid = this.$form.get(0).checkValidity() || this.formActive === false;
if (formValid) {
this.$form.submit();
delay(() => {
this.$form.trigger('submit');
}, 100);
} else {
eventHub.$emit('validateForm');
this.vue.$store.dispatch('setIsSaving', false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment