CompactSlider
CompactSlider copied to clipboard
CompactSlider's action not working inside a Form
Describe the bug
Both Tap&Drag is not working when CompactSlider is inside in a Form.
Normal Slider works properly.
To Reproduce Steps to reproduce the behavior:
struct DemoView: View {
@State private var progress = 0.0
var body: some View {
Form {
Section {
Slider(value: $progress, in: 0.0 ... 1.0, step: 0.001) {
Text("Progress \(progress, format: .percent)")
}
CompactSlider(value: $progress, in: 0.0 ... 1.0, step: 0.01) {
Text("Progress")
Spacer()
Text("\(progress, format: .percent)")
}
}
}
}
}
Expected behavior
Both Slider and CompactSlider work properly.
Screenshots
Platform and version:
- OS: iOS 16.1 beta 3
- Device: iPhone 14 Pro Max
Additional context
It's working on Simulator but not on real device.
If CompactSlider is in a normal VStack, it will also work properly.
Also tested on the following config:
CompactSlider on Form:
iOS 16.1 beta 3 + iPhone 14 Pro Max ❌
iOS 16.0.1 + iPhoneXs ✅
macOS 13 beta 10 ✅
I'll take a look, but don't you think it could be an issue of the iOS 16.1 beta 3? 🤔
I'll take a look, but don't you think it could be an issue of the iOS 16.1 beta 3? 🤔
+1. Will wait for the RC/Release version to see if the bug still exists.
I'll take a look, but don't you think it could be an issue of the iOS 16.1 beta 3? 🤔
Still failing on the release of 10.24.
iPhone 14 Pro Max (iOS 16.1) + Xcode 14.1 RC 2
Same happening here with an iPhone 13 Pro (iOS 16.1.1). It is working perfectly in the simulator, an iPhone 14 Pro Max (iOS 16.1).
If it's inside a Form, it doesn't work in the real device, but it does in the simulator. Weird.
Could you share you latest findings regarding this? Thank you. I'll do if I find something.
I'll check on device
I updated the Demo App and added Form examples. It looks like it works for me ¯\_(ツ)_/¯ Could you please try or provide some code where it doesn't work?
I updated the Demo App and added Form examples. It looks like it works for me ¯_(ツ)_/¯ Could you please try or provide some code where it doesn't work?
It is fine on my iPhone XS + iOS 16.1. But still failing on iPhone 14 Pro Max.
The code is provided on the first post.
I suspect it has nothing to do with OS version. And the device model is the key to reproduce.
Currently it is failing on iPhone 13 Pro (iOS 16.1.1) & iPhone 14 Pro Max (iOS 16.1), other device model's case is unknown.
I made a fix, please check, v.1.1.3
Confirm to be fixed. Thanks