Bug 232295 - webView.scrollView.indicatorStyle does not work on iOS 15
Summary: webView.scrollView.indicatorStyle does not work on iOS 15
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: 239898
  Show dependency treegraph
 
Reported: 2021-10-25 23:21 PDT by Daohan Chong
Modified: 2022-08-11 11:33 PDT (History)
6 users (show)

See Also:


Attachments
The demo project (please run it using iOS 14 and 15 simulators respectively) (12.32 KB, application/zip)
2021-10-25 23:21 PDT, Daohan Chong
no flags Details
Patch (12.32 KB, patch)
2021-11-04 17:23 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daohan Chong 2021-10-25 23:21:46 PDT
Created attachment 442467 [details]
The demo project (please run it using iOS 14 and 15 simulators respectively)

Previously, on iOS 14, this kind of code can work perfectly:

```swift
  override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
    super.traitCollectionDidChange(previousTraitCollection)

    switch traitCollection.userInterfaceStyle {
    case .light:
      webView.scrollView.indicatorStyle = .black
    case .dark:
      webView.scrollView.indicatorStyle = .white
    default:
      break
    }
  }
```

However, after iOS 15, it stopped from working. We cannot find any related documentation about customizing the color of the scroll indicator.
Comment 1 Simon Fraser (smfr) 2021-10-26 08:30:36 PDT
<rdar://82816423>
Comment 2 Devin Rousso 2021-11-04 17:23:31 PDT
Created attachment 443361 [details]
Patch
Comment 3 EWS 2021-11-08 12:54:17 PST
Committed r285424 (243980@main): <https://commits.webkit.org/243980@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 443361 [details].
Comment 4 Florent Morin 2022-07-05 01:03:11 PDT
This fix don't work on iOS when view is not opaque.