|
@@ -17,12 +17,16 @@ export function useKeyboardEvents() {
|
|
|
window.addEventListener('keydown', onKeyDown)
|
|
|
window.addEventListener('keyup', onKeyUp)
|
|
|
document.addEventListener('paste', e => {
|
|
|
- e.preventDefault()
|
|
|
- app.paste(e)
|
|
|
+ if (!app.editingShape) {
|
|
|
+ e.preventDefault()
|
|
|
+ app.paste(e)
|
|
|
+ }
|
|
|
})
|
|
|
document.addEventListener('copy', e => {
|
|
|
- e.preventDefault()
|
|
|
- app.copy()
|
|
|
+ if (!app.editingShape) {
|
|
|
+ e.preventDefault()
|
|
|
+ app.copy()
|
|
|
+ }
|
|
|
})
|
|
|
return () => {
|
|
|
window.removeEventListener('keydown', onKeyDown)
|