Various improvements

This commit is contained in:
barsdeveloper
2022-02-13 23:04:07 +01:00
parent 7cf556d89d
commit a0fcc23e31
16 changed files with 355 additions and 92 deletions

View File

@@ -14,11 +14,11 @@ export default class Copy extends Context {
}
}
blueprintFocused() {
listenEvents() {
document.body.addEventListener("copy", this.copyHandler)
}
blueprintUnfocused() {
unlistenEvents() {
document.body.removeEventListener("copy", this.copyHandler)
}

View File

@@ -12,11 +12,11 @@ export default class Paste extends Context {
this.pasteHandle = e => self.pasted(e.clipboardData.getData("Text"))
}
blueprintFocused() {
listenEvents() {
document.body.addEventListener("paste", this.pasteHandle)
}
blueprintUnfocused() {
unlistenEvents() {
document.body.removeEventListener("paste", this.pasteHandle)
}