Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 608c65c

Browse files
fix: touch elements on mobile
1 parent 47328f7 commit 608c65c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

studio/src/app/components/editor/app-editor-toolbar/app-editor-toolbar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ export class AppEditorToolbar {
143143
if (this.selectedElement) {
144144
this.selectedElement.removeEventListener('paste', this.cleanOnPaste, true);
145145

146+
this.selectedElement.blur();
147+
146148
await this.hideToolbar();
147149
}
148150

studio/src/app/pages/editor/app-editor/app-editor.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,10 @@ export class AppEditor {
445445
return;
446446
}
447447

448+
if ($event instanceof TouchEvent) {
449+
$event.preventDefault();
450+
}
451+
448452
if (!$event.target || !($event.target instanceof HTMLElement)) {
449453
resolve();
450454
return;

0 commit comments

Comments
 (0)