From 98b3eaadb588fa32f55008c08715792c748509e5 Mon Sep 17 00:00:00 2001 From: Dermot Duffy Date: Sat, 25 Jun 2022 09:33:32 -0700 Subject: [PATCH] Don't support card-wide actions when a message is displayed --- README.md | 3 ++- src/card.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ffc2d6f..7bf642f0 100644 --- a/README.md +++ b/README.md @@ -932,7 +932,8 @@ next/previous controls, thumbnails, etc), but in some cases this is not possible (e.g. embedded WebRTC card controls) -- in these cases duplicate actions may occur with certain configurations (e.g. `tap`). -**Note:** Card-wide actions are not supported on the timeline view. +**Note:** Card-wide actions are not supported on the timeline view, nor when a +info/error message is being displayed. ## Menu Styles diff --git a/src/card.ts b/src/card.ts index 87422e03..696e312a 100644 --- a/src/card.ts +++ b/src/card.ts @@ -1695,7 +1695,7 @@ export class FrigateCard extends LitElement { * @returns A combined set of action. */ protected _getMergedActions(): Actions { - if (this._view?.is('timeline')) { + if (this._message || this._view?.is('timeline')) { // Timeline does not support actions as it is not possible to prevent // touch actions on the timeline surface from triggering card-wide actions // inappropriately, whilst also maintaining touch interaction with the