Skip to content

Commit d679320

Browse files
authored
Merge pull request #295 from ejensen/fix-tvos-clip
`ConsoleView` focus state clipping on tvOS
2 parents 1749e31 + 34ed5b0 commit d679320

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Sources/PulseUI/Features/Console/ConsoleView-tvos.swift

+12
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public struct ConsoleView: View {
3737
.onAppear { listViewModel.isViewVisible = true }
3838
.onDisappear { listViewModel.isViewVisible = false }
3939
}
40+
.disableScrollClip()
4041
.injecting(environment)
4142
.environmentObject(listViewModel)
4243
}
@@ -92,6 +93,17 @@ private struct ConsoleMenuView: View {
9293
}
9394
}
9495

96+
extension View {
97+
@available(tvOS, obsoleted: 17.0, renamed: "scrollClipDisabled")
98+
@ViewBuilder func disableScrollClip() -> some View {
99+
if #available(tvOS 17.0, *) {
100+
scrollClipDisabled()
101+
} else {
102+
self
103+
}
104+
}
105+
}
106+
95107
#if DEBUG
96108
struct ConsoleView_Previews: PreviewProvider {
97109
static var previews: some View {

Sources/PulseUI/Features/Inspector/NetworkInspectorView-tvos.swift

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ struct NetworkInspectorView: View {
2626
Form { lhs }.frame(width: 740)
2727
Form { rhs }
2828
}
29+
.disableScrollClip()
2930
}
3031

3132
@ViewBuilder

0 commit comments

Comments
 (0)