From 41eb93bc6e8868a8d4f0c35c908f34667319cde2 Mon Sep 17 00:00:00 2001 From: kenmueller Date: Fri, 10 Apr 2020 18:24:27 -0700 Subject: [PATCH] Fixed placeholder click because of allowsHitTesting breaking in the newest SwiftUI update --- Sources/TextView/TextView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/TextView/TextView.swift b/Sources/TextView/TextView.swift index 68ce397..ccaf80b 100644 --- a/Sources/TextView/TextView.swift +++ b/Sources/TextView/TextView.swift @@ -220,7 +220,9 @@ public struct TextView: View { height: geometry.size.height, alignment: self.placeholderAlignment ) - .allowsHitTesting(false) + .onTapGesture { + self.isEditing = true + } } } }