From ba580c4a4f1cd7dcb506a960c073b9a16832bff2 Mon Sep 17 00:00:00 2001 From: cramerL Date: Fri, 27 Nov 2026 00:38:06 +0100 Subject: [PATCH] remove focus of input elements when clicking on the canvas. fixes #364 --- CHANGELOG.md | 3 +++ webapp/src/app/components/phaser/phaser.component.html | 2 +- webapp/src/app/components/phaser/phaser.component.ts | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6d6be8c..baac6802 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed +- Fixed an issue where keyboard shortcuts conflicted with input elements [#364](https://github.com/CCDirectLink/crosscode-map-editor/issues/364) + ## [2.8.0] 2026-11-26 ### Added - Added support for SELECT_RANDOM events diff --git a/webapp/src/app/components/phaser/phaser.component.html b/webapp/src/app/components/phaser/phaser.component.html index 9ae25b93..31ea3edf 100644 --- a/webapp/src/app/components/phaser/phaser.component.html +++ b/webapp/src/app/components/phaser/phaser.component.html @@ -1,2 +1,2 @@ -
+
\ No newline at end of file diff --git a/webapp/src/app/components/phaser/phaser.component.ts b/webapp/src/app/components/phaser/phaser.component.ts index ef523882..3c53c87f 100644 --- a/webapp/src/app/components/phaser/phaser.component.ts +++ b/webapp/src/app/components/phaser/phaser.component.ts @@ -103,7 +103,13 @@ export class PhaserComponent implements AfterViewInit { ); Globals.game.scale.setZoom(1 / window.devicePixelRatio); } - + + blurActiveElement() { + if (document.activeElement instanceof HTMLElement) { + document.activeElement.blur(); + } + } + private getScale() { const rect = this.content.nativeElement.getBoundingClientRect(); return {