Skip to content

Commit 7c93b98

Browse files
committed
fix: terminal resize glitching in iOS 26
1 parent b3beb66 commit 7c93b98

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

CodeApp/Views/PanelView.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ struct PanelView: View {
128128
@SceneStorage("panel.height") var panelHeight: Double = DefaultUIState.PANEL_HEIGHT
129129

130130
@State var showSheet = false
131+
@GestureState private var translation: CGFloat?
131132

132133
var maxHeight: CGFloat {
133134
windowHeight
@@ -155,10 +156,12 @@ struct PanelView: View {
155156
.frame(height: min(CGFloat(panelHeight), maxHeight))
156157
.background(Color.init(id: "editor.background"))
157158
.gesture(
158-
DragGesture()
159-
.onChanged { value in
160-
let proposedNewHeight = panelHeight - value.translation.height
159+
DragGesture(minimumDistance: 10.0, coordinateSpace: .global)
160+
.updating($translation) { value, gestureState, transaction in
161+
let proposedNewHeight =
162+
panelHeight - value.translation.height + (gestureState ?? 0)
161163
evaluateProposedHeight(proposal: proposedNewHeight)
164+
gestureState = value.translation.height
162165
}
163166
)
164167
}

0 commit comments

Comments
 (0)