From a7d259f8ccfaf1c9ead436102547a7e6bdacd3a3 Mon Sep 17 00:00:00 2001 From: Timothy Moose Date: Mon, 6 Mar 2017 06:09:29 -0600 Subject: [PATCH] Fix infinite loop bug --- SwiftMessages/MessageView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SwiftMessages/MessageView.swift b/SwiftMessages/MessageView.swift index 4e225c85..6000ca2b 100644 --- a/SwiftMessages/MessageView.swift +++ b/SwiftMessages/MessageView.swift @@ -32,7 +32,9 @@ open class MessageView: BaseView, Identifiable { // Only accept touches within the background view. Anything outside of the // background view's bounds should be transparent and does not need to receive // touches. This helps with tap dismissal when using `DimMode.gray` and `DimMode.color`. - return backgroundView.point(inside: point, with: event) + return backgroundView == self + ? super.point(inside: point, with: event) + : backgroundView.point(inside: point, with: event) } /*