Gustavo marques adolph
2018-10-22 03:39:12 UTC
Hello everyone,
I'm dealing with a strange problem, when i call click method inside a
promise doesnt works but same code works in others browsers.
Have any security stuffs to prevent this?
this is a sample of my code.
async uploadBase(event) {
if (this.checkIfElementAlreadyDisableByEvent(event)) {
event.preventDefault();
return;
}
this.blockButton(this.getButtonIdByEvent(event));
const uploadFile = document.getElementById("uploadFile");
document.body.onfocus = this.checkUploadCancel;
uploadFile.addEventListener("change", this.onUploadFile, false);
if (!this.additional.hasProjects) {
uploadFile.click();
}
var resultSwal = await this.$swal({
title: "Existem Grupos já associados a essa base de dados!",
text:
"Caso prossiga não será mais possÃvel realizar alterações na base de
Simulação desses Grupos.",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: this.$t("swal.delete.confirmText"),
cancelButtonText: this.$t("swal.delete.cancelText"),
confirmButtonClass: "btn btn-success",
cancelButtonClass: "btn btn-danger",
buttonsStyling: false,
reverseButtons: true,
showLoaderOnConfirm: true,
allowOutsideClick: () => !that.$swal.isLoading(),
preConfirm: () =>
contractsProxy.blockAllProjectsToUpdateFilters(
this.selectedContractId
)
});
if(resultSwal.success){
uploadFile.click();
}
},
I'm dealing with a strange problem, when i call click method inside a
promise doesnt works but same code works in others browsers.
Have any security stuffs to prevent this?
this is a sample of my code.
async uploadBase(event) {
if (this.checkIfElementAlreadyDisableByEvent(event)) {
event.preventDefault();
return;
}
this.blockButton(this.getButtonIdByEvent(event));
const uploadFile = document.getElementById("uploadFile");
document.body.onfocus = this.checkUploadCancel;
uploadFile.addEventListener("change", this.onUploadFile, false);
if (!this.additional.hasProjects) {
uploadFile.click();
}
var resultSwal = await this.$swal({
title: "Existem Grupos já associados a essa base de dados!",
text:
"Caso prossiga não será mais possÃvel realizar alterações na base de
Simulação desses Grupos.",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: this.$t("swal.delete.confirmText"),
cancelButtonText: this.$t("swal.delete.cancelText"),
confirmButtonClass: "btn btn-success",
cancelButtonClass: "btn btn-danger",
buttonsStyling: false,
reverseButtons: true,
showLoaderOnConfirm: true,
allowOutsideClick: () => !that.$swal.isLoading(),
preConfirm: () =>
contractsProxy.blockAllProjectsToUpdateFilters(
this.selectedContractId
)
});
if(resultSwal.success){
uploadFile.click();
}
},
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.