From dabbe031ab28796bd71920338cbfa161d9f752ec Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 21 Jan 2023 23:46:38 +0100 Subject: [PATCH] Don't show the entity modal unless the user clicks on the name or icon --- .../src/components/panels/Entities/Entity.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue index 1307ef498..daaf32279 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue @@ -85,7 +85,10 @@ export default { }, onClick(event) { - if (event.target.classList.contains('label')) { + if ( + event.target.classList.contains('label') || + event.target.classList.contains('head') + ) { event.stopPropagation() this.toggleCollapsed() } @@ -94,7 +97,13 @@ export default { onEntityUpdate(entity) { // Check if any of the children have been updated const entityId = entity?.id - if (entityId == null || !(entityId in this.children)) + const isChildUpdate = ( + entityId != null && + this.children && + entityId in this.children + ) + + if (!isChildUpdate) return this.setJustUpdated()