Improving accessibility, fixes #279

This commit is contained in:
Liyas Thomas
2019-11-07 09:19:37 +05:30
parent c388eddc67
commit 48d4e69fc8
4 changed files with 18 additions and 16 deletions

View File

@@ -300,9 +300,9 @@
@click="copyRequestCode"
id="copyRequestCode"
ref="copyRequestCode"
v-tooltip="'Copy code'"
>
<i class="material-icons">file_copy</i>
<span>Copy</span>
</button>
</div>
</div>
@@ -1510,17 +1510,14 @@ export default {
}
},
copyRequestCode() {
this.$refs.copyRequestCode.innerHTML =
this.doneButton + "<span>Copied</span>";
this.$refs.copyRequestCode.innerHTML = this.doneButton;
this.$toast.success("Copied to clipboard", {
icon: "done"
});
this.$refs.generatedCode.select();
document.execCommand("copy");
setTimeout(
() =>
(this.$refs.copyRequestCode.innerHTML =
this.copyButton + "<span>Copy</span>"),
() => (this.$refs.copyRequestCode.innerHTML = this.copyButton),
1000
);
},