From b7fc6a260ba1feb17a086a02dd1c77f58ef6606a Mon Sep 17 00:00:00 2001 From: Daan Vanden Bosch Date: Tue, 30 Nov 2021 15:45:47 +0100 Subject: [PATCH] The 3-D view now becomes focussed when dropping an entity on it. This is done mainly so that the main undo stack becomes active. --- .../world/phantasmal/web/questEditor/widgets/EntityDnd.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/src/main/kotlin/world/phantasmal/web/questEditor/widgets/EntityDnd.kt b/web/src/main/kotlin/world/phantasmal/web/questEditor/widgets/EntityDnd.kt index 1699ab16..c915f207 100644 --- a/web/src/main/kotlin/world/phantasmal/web/questEditor/widgets/EntityDnd.kt +++ b/web/src/main/kotlin/world/phantasmal/web/questEditor/widgets/EntityDnd.kt @@ -115,6 +115,8 @@ private fun HTMLElement.observeEntityEvent( getEventData(e)?.let { data -> observer(EntityDragEvent(data, e)) } + + focus() }) private fun dragStart(e: DragEvent, entityType: EntityType, imageUrl: String) {