Skip to content

Commit 8b45059

Browse files
authored
Merge pull request #16 from JLZ/master
On tap, cancel scheduled DispatchWorkItem
2 parents 3d567ce + 50d978a commit 8b45059

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Source/PopupView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ public struct Popup<PopupContent>: ViewModifier where PopupContent: View {
186186
self.view()
187187
.simultaneousGesture(TapGesture().onEnded {
188188
if self.closeOnTap {
189+
self.dispatchWorkHolder.work?.cancel()
189190
self.isPresented = false
190191
}
191192
})

0 commit comments

Comments
 (0)