diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index c5e41c8c1..9951cdbbf 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -1911,6 +1911,12 @@ class ChatController extends State Future.delayed( Duration(milliseconds: buttonEventID == event.eventId ? 200 : 0), () { + if (_router.state.path != ':roomid') { + // The user has navigated away from the chat, + // so we don't want to show the overlay. + return; + } + OverlayUtil.showOverlay( context: context, child: overlayEntry!,