shortcut bypass

This commit is contained in:
Evert Prants 2023-06-09 22:53:19 +03:00
parent 61b6e52403
commit 65f84c4d6c
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@
<div class="sidebar-row">
<button
type="button"
data-editor-events="true"
:draggable="true"
:class="{
selected: !!selected,

View File

@ -26,7 +26,11 @@ export class ShotcutsComponent extends EngineComponent {
private bindEvents() {
const keyPressEvent = (event: KeyboardEvent) => {
if (!event.target || (event.target as HTMLElement).tagName !== 'BODY')
if (
!event.target ||
((event.target as HTMLElement).tagName !== 'BODY' &&
!(event.target as HTMLElement).hasAttribute('data-editor-events'))
)
return;
if (event.key === 'Delete') {