CompactSlider icon indicating copy to clipboard operation
CompactSlider copied to clipboard

CompactSlider's action not working inside a Form

Open Kyle-Ye opened this issue 2 years ago • 1 comments

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

IMG_0407

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.

Kyle-Ye avatar Oct 11 '22 14:10 Kyle-Ye

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 ✅

Kyle-Ye avatar Oct 11 '22 14:10 Kyle-Ye

I'll take a look, but don't you think it could be an issue of the iOS 16.1 beta 3? 🤔

buh avatar Oct 13 '22 11:10 buh

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.

Kyle-Ye avatar Oct 13 '22 12:10 Kyle-Ye

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

Kyle-Ye avatar Oct 25 '22 07:10 Kyle-Ye

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.

CSolanaM avatar Dec 11 '22 22:12 CSolanaM

I'll check on device

buh avatar Dec 12 '22 16:12 buh

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?

buh avatar Dec 16 '22 17:12 buh

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.

Kyle-Ye avatar Dec 19 '22 01:12 Kyle-Ye

I made a fix, please check, v.1.1.3

buh avatar Dec 27 '22 18:12 buh

Confirm to be fixed. Thanks

Kyle-Ye avatar Jan 03 '23 04:01 Kyle-Ye