For many years, I've noticed that although in native code I can handle continuous and simultaneous Apple pencil and touch inputs using UIKit, Safari and WKWebView's PointerEvents only seem to allow you to use one input type at a time. i.e. Apple Pencil down blocks touch input until lifted and touch input blocks Apple Pencil input. It's as though requiresexclusivetouchtype has been set in the underlying webkit implementation. There's decades of research (e.g. https://dl.acm.org/doi/10.1145/1866029.1866036 ) and several existing native applications in production showing that multimodal inputs open-up many unique and useful applications and interactions. Even a simple "hold object with finger" + "draw with stylus" controls are the norm. I recently built a native application using multimodal simultaneous inputs, but this is impossible to port to web due to the unexpected behavior of PointerEvents (and touch events, and mouse events; any variant exhibits the same behavior). I've researched and attempted to apply every possible flag, change, and css code to get this working, but I think the behind-the-scenes implementation is what's blocking the simultaneous touch types.
This is unexpected and undesired behavior because it's inconsistent with the native behavior. If it's unintended, it's a big priority to fix for creating better user experiences on the iPad. If it's intended, I do not believe that's reasonable (even if it might be more complex and used for more advanced applications). Please expose a way to support simultaneous touch types in iPadOS/iOS in both Safari and WKWebView.
At minimum, may we have a discussion on how to support the desired behavior? The simplest solution I can think of is to provide a webkit-platform-specific boolean in Safari and WKWebView called requiresExclusiveTouchType, which is set to False by default to keep the current behavior, and settable to True to get the more flexible behavior I'm expecting.
Explore the integration of web technologies within your app. Discuss building web-based apps, leveraging Safari functionalities, and integrating with web services.
Post
Replies
Boosts
Views
Activity
I'm encountering an issue with ReactPlayer where videos fail to play when the playback rate is set to 3x, but this problem only occurs on iOS. The same functionality works perfectly fine on Android devices and desktop browsers like Chrome and Firefox.
Here are the details of my setup:
ReactPlayer version: 2.16.0
Video format: [MP4, hls ]
Tested devices: iPhone 13
Expected behavior: Videos should play smoothly at 3x speed.
Actual behavior: Videos fail to load or play when playbackRate is set to 3.0.
I've read that iOS Safari might have limitations regarding playback rate due to performance or energy efficiency, but I couldn't find any official documentation to confirm this.
If anyone has faced a similar issue or knows the root cause (or a workaround), I'd really appreciate your insights. Additionally, if there are official resources or documentation about playback rate limitations on iOS Safari, please share them.
Thanks in advance for your help!
Is there a way to read all URLs of the currently open Safari TabGroup from a Safari Extension? In macOS and iOS
On iOS (iPhone or iPad) the following behaviour happens:
when both an HTML video element and an HTML audio element are playing on a page,
and the video source ends,
and the video source is programmatically forced to play again
then the system will automatically pause the audio.
See following stackblitz project for a sample:
https://stackblitz.com/edit/ios-audio-paused-on-video-playing?file=README.md
Steps to reproduce
Feel free to try with both another audio and video source, here limited by the available space in Stackblitz plan.
On an iPhone/iPad device or simulator, in Safari:
browse to index.html
when on iPhone, press iPhone Load to force preloading video. Not needed on iPad
press Play to start playing both audio and video
wait until clip ends and then restarts from 0:00
Expected
Audio should keep on playing and eventually loop.
Actual
When clip restarts from 0, audio is put to pause by the system.
Further details
This does not happen e.g. on Mac Safari nor on another device/browser.
Also, some alternative scenarios:
when HTML video element has the muted attribute, the issue disappears and audio is not paused
when HTML audio element is replace with Web Audio API, the issue disappears and audio is not paused
Hi,
I am wondering if anyone has experience with Smart Banners for an application not released on the app store, but still in TestFlight, specifically an AppClip.
I am working on an exisiting project where a Smart Clip is used with a smart banner on the website for core functionality. Previously, even in test environment (app is in test flight and not app store) the smart banner would correctly show on the website and allow testers to launch the app clip experience, however this no longer seems to work.
Its noted the test environment was last tested and deployed 2 years ago, and was working correctly, and there have been no changes to the website (the meta tag and .aasa file are all setup correctly). The only recent change was upgrading the app to support the latest iOS version, however beyond that no functionality in the app has changed.
Apple developer support hasn't been very helpful, and reviewed our account and stated "everything appears to be running as expected on our end"
Has something changed in Safari in that it no longer accepts test flight app smart banners, and if it doesn't, does anyone have any other suggestions?
Cheers
I've been having connection issues with WebRTC in my web app since updating my devices to iOS 17 or above.The issues are inconsistent, but generally the video connection cuts out after a couple seconds, & keep reconnecting again and again.
My app code is working fine for these days since 5 to 6 years. its also working fine ios 16 and below device. I am using safari browser. what could be the issue can anyone tell?
i am using Janus webrtc by meetcho
When a tab goes to sleep, all its resources gets killed. When the user has any interaction it gets active again. However, if there is an audio in the tab, it does not play again even after user interaction. One has to reload/reopen the tab.
Is this how it should work?
Is there a fix for this?
We have an iOS app (which runs on macOS via "Designed for iPad") which renders web content on WKWebView. Our users can select text (standard OS way of click & drag cursor across text) and then perform actions on those discrete pieces of text.
On macOS 15.1, our users can only expand a text selection, they cannot contract the text selection by dragging the cursor to the left. This reduces the usability of our app on macOS 15.1. This is not an issue on macOS 14.
Environment: MacBook Pro (2021 16” M1 Max), macOS 15.1
Submitted Feedback FB15726254.
Hello
I built a WordPress website with a three.js/react front page. On iOS chrome, Android chrome, and desktop chrome all is working well. However, on Safari mobile when the animation loads a downward swipe causes the page to refresh rather than scroll as is intended and working correctly on all the other browsers. Strangely, scroll up works initially and then downward scroll begins to work. I have tried various iterations of overscroll behavior but still cannot aolbe the issue. Any help would be appreciated.
Good day, please send the code for your application to TestFlight. Rudolf Chejn
the backdrop is not work through css variable, but
it works well through the certain value.
and the problem wasn't appear in old version
Hello everyone,
We are encountering a specific issue on iOS devices (iPhone 15 Pro in our case) when using Safari and Chrome. The problem occurs when switching an element's overflow-x property from hidden to scroll while the user keeps their finger on the screen.
Problem Description:
The overflow-x property change does not trigger a reflow or render update immediately.
This behavior causes the element to remain visually stuck in the previous hidden state until the user lifts their finger and interacts again.
Context:
The element is animated.
The issue happens consistently when the user's finger remains on the screen during the property transition.
What We’ve Tried:
Explicitly forcing styles using element.style in JavaScript.
Triggering element.offsetWidth or getBoundingClientRect() to force reflow.
Applying manual transform changes in combination with overflow updates.
Unfortunately, none of these approaches resolve the issue in real-time while the user’s finger is on the screen.
Questions:
Is there a recommended way to force a reflow or repaint in Safari/Chrome on iOS under these conditions?
Are there known limitations with overflow-x transitions and user touch events on iOS?
Are there any workarounds or best practices to handle such cases?
Thank you in advance for any insights!
Safari throw a ViewTransition error, called ' Unhandled Promise Rejection: AbortError: Old view transition aborted by new view transition.' however, i don't find how to catch it.
i used 'try..catch' or Promise.catch, or catch it in finished/ready/updateCallbackDone Promise. These all don't work.
I’m experiencing an issue where Safari takes approximately 30 seconds to load web pages on mTLS-enabled sites. However, when I enable Private Browsing mode, the problem disappears. This suggests that the issue is not related to the network environment.
To provide more context, I’ve attached a Wireshark packet capture for reference. From the logs, it seems that the TLS handshake process encounters delays, but I cannot identify the exact cause.
Has anyone encountered a similar issue or can provide insights into what might be causing this behavior? Any troubleshooting suggestions or fixes would be greatly appreciated.
OS: iPadOS 18.2.1
Thank you!
Wireshark packet capture
Hello,
I am developing a Mac application via Mac Catalyst and encountering an issue with WKWebView. Specifically, I'm loading a webpage (e.g., https://translate.google.com) in WKWebView, but when I press the copy button on the page, the content doesn't actually copy to the clipboard.
I've attempted modifying the UserAgent without any success. Here is the relevant part of my code:
override func viewDidLoad() {
super.viewDidLoad()
let config = WKWebViewConfiguration()
config.preferences = WKPreferences()
config.defaultWebpagePreferences.preferredContentMode = .desktop
let webView = WKWebView(frame: .zero, configuration: config)
webView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(webView)
webView.scrollView.showsVerticalScrollIndicator = false
webView.backgroundColor = UIColor.white
webView.scrollView.backgroundColor = UIColor.white
webView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
webView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
webView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
webView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
if let url = URL(string: "https://translate.google.com") {
let req = URLRequest(url: url)
webView.load(req)
}
}
Hello,
I'm using Safari 18.2 on Sonoma 14.6.1.
I was using the Developer Tools to do a Local Request Override in the Source tab for a CSS file that had a changing query string. I thought I had a good regular expression to catch all variants, but apparently it was too generic and possibly wrong, and made both Source and Network tabs no longer work in my Safari.
The regular expression I entered for the Local Request Override was: //build/style.css(?.*)?$
Now my dev tools is broken to the extent that the Source and Network tabs no longer work. The slide-out panel on Source that shows Breakpoints, LocalOverrides, etc no longer shows. The toggle for it does, but does nothing now. UI in general looks a little wack on both tabs.
So, since I can't turn off the Local Request Override, I've been trying to locate where Safari may have stored it to manually delete it. Not having a lot of luck on that front.
It seems to me that Safari was unable to escape my regular expression correctly and it then causes additional issue. Just a guess though.
Any advice or help in getting Safari Source & Network working again / manual removal of the LocalOverride would be greatly appreciated. I'm fluent in OSX and Linux, but grep was not much help surfacing anything that worked.
Thanks in Advance, possibly a Safari bug as well.
Hello!
I am looking to use SF Pro as the main font of my website. This website is used as a place of purchase for some of my products, none of which will actually be using this font.
The websites logo will also not be using this font, however I am worried that may be legally unviable.
Please let me know if this is an option. I'm not looking to get direct financial gain by using your fonts, just would like to use it for the website.
Thank you for your help.
The app analytics tab for my account is empty. It doesn't show any bundle IDs or apps that have been launched. Is this normal for WatchOS apps?
Here's a screenshot of the tab: https://cloud.goodsmile.studio/hT5fL2HY
Hi Apple developers, I am very new to XCode and Swift, I am planning to build an app for iOS from a web. I tried to use WKWebView to handle the web , I managed to redirect some of the links to Safari, however some button/links didn't trigger .linkActivated function and encounter the error as "Your browser preventing this app to open “URL”.
If I copy the URL to Safari is able to open, I trying to research on web but can't find any related solution for my case.
Here is the code in my app:
import UIKit
import WebKit
import SafariServices
class ViewController: UIViewController, WKNavigationDelegate {
var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
// Initialize WKWebView
let webConfiguration = WKWebViewConfiguration()
//enable javascript
webConfiguration.preferences.javaScriptEnabled = true
webView = WKWebView(frame: self.view.frame, configuration: webConfiguration)
webView.navigationDelegate = self
self.view.addSubview(webView)
// Load a web page as webview
if let url = URL(string: "https://myurl") {
let request = URLRequest(url: url)
webView.load(request)
}
//console log
webView.evaluateJavaScript("console.log('Button clicked!')") { result, error in
if let error = error {
print("Error executing JavaScript: \(error.localizedDescription)")
} else {
print("JavaScript result: \(String(describing: result))")
}
}
}
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
if let url = navigationAction.request.url, navigationAction.navigationType == .linkActivated {
// Check if URL is external and open it in Safari
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
decisionHandler(.cancel) // Prevent loading the link in the WebView
} else {
decisionHandler(.allow) // Allow loading if URL cannot be opened in Safari
}
} else {
decisionHandler(.allow) // Allow the WebView to load the URL normally
}
}
}
PWA works perfectly fine in safari browsers in mac but in mobile devices it
is not working it just shows, There is no internet connection. found a fix from ios release - https://developer.apple.com/documentation/safari-release-notes/safari-17_2-release-notes
but actually it is not solving the issue. in my case even it is not throwing the issue -
fix is - Fixed a cache miss bug in DOMCache that triggered service worker fetch errors. (115740959) (FB13188943)