WebKit JS

RSS for tag

Access and modify DOM elements within a webpage, including touch events and visual effects, using WebKit JS.

Posts under WebKit JS tag

200 Posts

Post

Replies

Boosts

Views

Activity

Is there any way to get the text content displayed on the screen in WKWebView ?
I'm trying to get all of the text displayed on the screen in a WKWebView . First of all, the text inside the html file to be loaded is broken. So use evaluateJavaScript to call "document.body.textContent" or "document.body.innerText". Doing so will return the broken text verbatim. However, the content displayed on the webview screen is not broken and displayed normally. I want to know how to get all normal text rendered on this webview screen.
0
0
942
Feb ’23
https://nicer.app/ won't work correctly on iPhone, iPad, Mac Mini, etc?
hi, i got a major problem for my websites platform software on iPhones and iPads, even on some of the desktops (mac mini) now.. links don't work don't work on iPhone14 and iPad14. iPad14 resizes wrongly and keeps doing that when you shift between horizontal and vertical view, from still widely used jQuery(window).width() and .height() calls. https://nicer.app/NicerAppWebOS/index.php?uvt=n&lc=n&viewID=/ the blue links are intended to be clickable, and in the mode listed directly above here, will work as plain links.
0
0
665
Feb ’23
Unable to play video in mac safari and iphone using HTML5 video tag
In my application which records the video from any device and saving in aws server, and admin can play recorded videos from any os/ device. After the ios updated on Dec 14 2022, my video component is messed up, I cannot record or play video from apple devices. As I cannot write entire project code, I have the code in the below link [https://github.com/amran-quantum/videoplayertesting/blob/main/index.html) This video is playing in mac chrome but NOT in mac safari and any of the iphone devices. I am struggling since 15 days.
0
0
1.3k
Jan ’23
Script not able to modify window location within WebView on iOS 15.5+
Hi team, I'm troubleshooting some weird authentication issues within my website where I offer Signin with Apple option. Basically, after the user does Apple login, I have this script to update the location URI of the window opener back to my origin domain. But this line of the script is working correctly when login is launched in a browser such as Safari or Chrome, and it just got ignored when launched from a WebView within an application, and it can only be reproduced since iOS 15.5+. Here is some more context for comparison: Request from Safari: POST /callbackApple HTTP/1.1 Host: signin.example.com Content-Type: application/x-www-form-urlencoded Origin: https://appleid.apple.com Accept-Encoding: gzip, deflate, br Cookie: _ga=GA1.3.1679051778.1669664368; _gat=1; _gid=GA1.3.1808016405.1669664368; signin-cookie="5ce93a47904daa5e"; _abck=F930E04300E8E8AB552C14541A40AD3C~0~YAAQmZTYF7CO3fCBAQAAZkOmHQha0qNYdbsfcZ4zEtwsjoRST+T+DNTMb5+E9uL8OvEL3YA0K0Tn7xS+OKoGPGib5rmpBOZVQq1+XoPEFJOij8Ao8mMKrvztGMN0HgNBmldcy3BCpTLgWFgckVzF/MOLhHL87yVOhCnsKqJEG8WwuH9I1G6xb2k4R6CfX9qzCfh9pexN2KBbE/FW7KtrP5KkRq2Y2a6AlQA3hr068J426LBkRAiHhj7mrAjIZHPXVlAq9PLKSO/LOxvovAbh6bOUP6EZHk1De4IvPU5DqwdA2yQMtyrz/K+MHE5NA0oaLTjhiSmTNUFOckcmQAl+9PRuXYpgVa5UukkSztNLlbn4xOi2ZvZ4B0jtSg57AeXsl56j36NSCmBqioEdA7N54V3IiwOz~-1~-1~-1 Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1 Referer: https://appleid.apple.com/ Content-Length: 1293 Accept-Language: en-US,en;q=0.9 Same request sent from WebView in another App POST /callbackApple HTTP/1.1 Host: signin.example.com Content-Type: application/x-www-form-urlencoded Origin: https://appleid.apple.com Accept-Encoding: gzip, deflate, br Cookie: ga=GA1.3.439982965.1669661343; _gat=1; _gid=GA1.3.712268364.1669661343; signin-cookie="39fd5b51e0350b24" Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1 Referer: https://appleid.apple.com/ Content-Length: 1448 Accept-Language: en-US,en;q=0.9 And the response to the requests above is always the same, a blank HTML page as shown below with some scripts to update the opener and redirect user back to my website. Note that the script self.close() always works, but window.opener.location.replace(redirectUri) only works when it's inside of Safari or Chrome browser but not in Webview opened by some other application. Response body content: ... <script type="text/javascript"> var redirectUri = 'https://example.com'; redirectUri = redirectUri + "access_token=" + "${accessToken?no_esc}" + "&token_type=apple"; [#if nickName??] redirectUri = redirectUri + "&nickName=" + "${nickName?no_esc}"; [/#if] redirectUri = redirectUri + "&_eventId=loginFromApple" + "&execution=" + "${execution?no_esc}"; if ( window.opener ) { window.opener.location.replace(redirectUri); self.close(); } </script> ... I'm not sure could it be related to some security update within Webkit https://support.apple.com/en-us/HT213412 but we started to see this issue after the iOS version mentioned in the post. Any help would be much appreciated, thanks.
0
0
2.7k
Nov ’22
Extract images loaded in a WKWebView
Related: https://developer.apple.com/forums/thread/47176 Hey all, I have a WKWebView running in the background of a SwiftUI app which loads webpages that have images in them: <img src="…" /> and would like to extract those image data from the WKWebView for using in my SwiftUI app. The app is supposed to run on iOS and macOS (sandboxed). I have a working solution of this, where I use WKWebView's evaluateJavaScript() to get the URL in the src attribute of the img-tag and then download that url in Swift to a Data object for further processing. While this solution works, it requires fetching the image a second time, which at best adds network load and at worst returns a different image. There is the option of re-rendering the img element to a canvas, extracting the ImageData from there using Javascript, and returning the blob to Swift. According to SO, rendering an img element to a canvas can disturb the image and this seems like an unstable workaround at best, so I have been looking for alternatives of directly getting the image from WKWebView. Are any of the following ideas feasible to extract image data from a WKWebView? Cache: Use WKWebsiteDataStore to fetch a WKWWebsiteDataRecord including the cached images (see here). Or could the image be showing on the WKWebView but not be saved in cache? Webarchive: Create a webarchive of the WKWebView (see here) and extract the image from there. Is there any documentation on parsing .webarchive files? Intercept network requests and responses: When using Safari web inspector's Network monitor, I can see all network requests and responses (including images). However, when using WKNavigationDelegate's method for intercepting WKNavigationActions (see here), I do not see image requests. Is there a way to see all network requests of a WKWebView including requests that load images into an img-element? Thank you! Cheers, Anton
0
2
1.7k
Oct ’22
window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable returns false in iOS 15.4+
I have a mobile app which is uses Web authentication PublickKeyCredential api provided by WebKit to authenticate users and use oauth token from the response to login to the app. Since iOS 15.4 released this following snippet is returning false window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable Please provide a workaround or let me know when this will get fix in WebKit
1
0
1.3k
Oct ’22
Segmentation fault 11 when implementing WKScriptMessageHandlerWithReply
Hi, I'm trying to implement the async handler of WKScriptMessageHandlerWithReply -> see yellow box in this reference. This is the method signature: func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) async -> (Any?, String?) But I end up with a Segmentation fault: 11 compilation error. I'm compiling with Xcode 13.4.1 (13F100). Did anybody successfully use this API or now a solution to fix it?
1
0
1.5k
Oct ’22
Using WKScriptMessageHandler to receive sensitive data
My MacOS application has a webview and I've been subclassing WKScriptMessageHandler to handle several messages received from the javascript code. For a new feature I would like to save user's password in the Keychain, to do so I need to send the password from the Javascript to the Swift codebase. The javascript code would be something like this: window.webkit.messageHandlers.loginData.postMessage({username: 'john', password: 'p@ss!123'}) Before implementing this approach I would like to know if there are any security vulnerabilities that I should know about. The sensitive data is being sent from the Javascript to the Swift code, so I wonder if it would be possible for someone to intercept it or getting the sensitive data somehow.
0
0
1k
Oct ’22
WKWebView JS Execution in test target
My team has a set of XCTestCases which create a new instance of WKWebView, execute some javascript with it, then assert some conditions afterward. Beginning with iOS 16, these tests never succeed because it seems like the WKWebView is experiencing some sort of crash or malfunction in its content process. When executing a single test of the type above, the following is present in the console: [Process] 0x142481000 - [PID=0] WebProcessProxy::didFinishLaunching: Invalid connection identifier (web process failed to launch) [Process] 0x142481000 - [PID=0] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=Crash [Process] 0x7f7d86008220 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::processDidTerminate: (pid 0), reason=Crash [Loading] 0x7f7d86008220 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::dispatchProcessDidTerminate: reason=Crash [Loading] 0x7f7d86008220 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::dispatchProcessDidTerminate: Not eagerly reloading the view because it is not currently visible I've tried ensuring that an app host is present for the test target these tests execute in and that had no effect. I've tried adding the webview to the apps view hierarchy and that had no effect. In iOS 15 and prior these same tests execute and pass fine. Was there some change in iOS 16 that may have caused this or any ideas on how to rectify this?
3
3
1.9k
Sep ’22
Safari 15 prompts the beforeunload alert, but does not block navigation
Using the example provided by MDN, the beforeunload event is working in my Safari browser: const beforeUnloadListener = (event) => { event.preventDefault(); return event.returnValue = "Are you sure you want to exit?"; }; addEventListener('beforeunload', beforeUnloadListener, { capture: true }); (I first must click into the window to make sure the browser detects interaction.) if I close the browser window, the alert blocks the window from being closed If I navigate to another page, the alert is shown However, when I navigate to another page, the alert does not block navigation. I am taken to the new page with the alert still being displayed. The alert is then "useless" in the sense that pressing the affirmative or negative buttons dismisses the alert, but has no other effect. This is not the expected behavior in Chrome or Firefox. In these, the page will not navigate or cancel navigation until an alert option is clicked. Is there any work-around? It seems it would be better to not show the alert at all than to show the alert while asynchronously unloading the current page and loading another page. I need to use this event to inform a user they may want to save changes to a document before leaving the page. This was the original use case for beforeunload.
4
1
4.8k
Sep ’22
M1 M2 webgl.ALIASED_POINT_SIZE_RANGE
I'm currently using gl.points to render sprites (lens flares, explosions, etc) looks like M1 / M2 hardware (ipad, macbook pro) limits the point size to 64. Every other device has minimum of 512, usually 1024, and many even provide 2048. wondering if this is a was a choice or oversight? Also, not sure where to file this type of bug/request as its specific to M1/M2 hardware that affects multiple devices? many thanks, -Dm
1
0
1.3k
Sep ’22
problem of application execution speed
We've created an webview style hybrid app, using framework based on PHP Compared to Android, it takes twice as much time to load the app on the iphone We've packaged the app using wk webview which based on Safari. Is there any issue that we can check in order to solve such slow running problem on iphone? Best regards, Son Seung Hee ICT Department, Apartners Co.
0
0
791
Sep ’22
Is there any way to get the text content displayed on the screen in WKWebView ?
I'm trying to get all of the text displayed on the screen in a WKWebView . First of all, the text inside the html file to be loaded is broken. So use evaluateJavaScript to call "document.body.textContent" or "document.body.innerText". Doing so will return the broken text verbatim. However, the content displayed on the webview screen is not broken and displayed normally. I want to know how to get all normal text rendered on this webview screen.
Replies
0
Boosts
0
Views
942
Activity
Feb ’23
WKWebView: how to display a big HTML5 canvas?
Hello, Viewport is 1180x820 on iPad, even if screen resolution is 2360x1640. If I set up a canvas of 2360x1640, only a quarter is displayed on my WKWebView. And I have to display a 2360x1640 canvas. So I'm not able to display it in my WKWebView on my iPad. I'm sure I do something wrong. Could you please help me? Regards, Alex
Replies
0
Boosts
0
Views
864
Activity
Feb ’23
https://nicer.app/ won't work correctly on iPhone, iPad, Mac Mini, etc?
hi, i got a major problem for my websites platform software on iPhones and iPads, even on some of the desktops (mac mini) now.. links don't work don't work on iPhone14 and iPad14. iPad14 resizes wrongly and keeps doing that when you shift between horizontal and vertical view, from still widely used jQuery(window).width() and .height() calls. https://nicer.app/NicerAppWebOS/index.php?uvt=n&lc=n&viewID=/ the blue links are intended to be clickable, and in the mode listed directly above here, will work as plain links.
Replies
0
Boosts
0
Views
665
Activity
Feb ’23
Only username autofill on webview
Hi, does anyone know why autofill doesn’t work when there’s just a single username field? It works if there’s both username and password but not when it’s just the username. Strangely enough, it works fine when it’s just the safari browser but just not on webview
Replies
0
Boosts
0
Views
1.3k
Activity
Jan ’23
Unable to play video in mac safari and iphone using HTML5 video tag
In my application which records the video from any device and saving in aws server, and admin can play recorded videos from any os/ device. After the ios updated on Dec 14 2022, my video component is messed up, I cannot record or play video from apple devices. As I cannot write entire project code, I have the code in the below link [https://github.com/amran-quantum/videoplayertesting/blob/main/index.html) This video is playing in mac chrome but NOT in mac safari and any of the iphone devices. I am struggling since 15 days.
Replies
0
Boosts
0
Views
1.3k
Activity
Jan ’23
Can I call WebAuthn API without user gesture?
Hello everyone 👋 I am attempting to run WebAuthn API automatically without any user-interaction when loading a web page. It was success on Windows and Android, but was failed on iOS. How could I make it work?
Replies
0
Boosts
0
Views
659
Activity
Jan ’23
Availability of letterSpacing <canvas> in Safari?
Do you have any idea when the "letterSpacing" property of CanvasRenderingContext2D API will be implemented in Safari? This feature is really useful for those who, like me, work with fonts on canvas. https://caniuse.com/mdn-api_canvasrenderingcontext2d_letterspacing
Replies
0
Boosts
0
Views
1.1k
Activity
Jan ’23
Accessing truedepth camera on browser
Is there any way of accessing truedepth camera of iPhones on the browser and use it
Replies
0
Boosts
2
Views
859
Activity
Dec ’22
I there a way to disable audioSession for particular website?
I want to disable a widget Now playing for a specific website. Can this be done with an injected script or with the standard macOS libraries?
Replies
0
Boosts
0
Views
944
Activity
Dec ’22
Script not able to modify window location within WebView on iOS 15.5+
Hi team, I'm troubleshooting some weird authentication issues within my website where I offer Signin with Apple option. Basically, after the user does Apple login, I have this script to update the location URI of the window opener back to my origin domain. But this line of the script is working correctly when login is launched in a browser such as Safari or Chrome, and it just got ignored when launched from a WebView within an application, and it can only be reproduced since iOS 15.5+. Here is some more context for comparison: Request from Safari: POST /callbackApple HTTP/1.1 Host: signin.example.com Content-Type: application/x-www-form-urlencoded Origin: https://appleid.apple.com Accept-Encoding: gzip, deflate, br Cookie: _ga=GA1.3.1679051778.1669664368; _gat=1; _gid=GA1.3.1808016405.1669664368; signin-cookie="5ce93a47904daa5e"; _abck=F930E04300E8E8AB552C14541A40AD3C~0~YAAQmZTYF7CO3fCBAQAAZkOmHQha0qNYdbsfcZ4zEtwsjoRST+T+DNTMb5+E9uL8OvEL3YA0K0Tn7xS+OKoGPGib5rmpBOZVQq1+XoPEFJOij8Ao8mMKrvztGMN0HgNBmldcy3BCpTLgWFgckVzF/MOLhHL87yVOhCnsKqJEG8WwuH9I1G6xb2k4R6CfX9qzCfh9pexN2KBbE/FW7KtrP5KkRq2Y2a6AlQA3hr068J426LBkRAiHhj7mrAjIZHPXVlAq9PLKSO/LOxvovAbh6bOUP6EZHk1De4IvPU5DqwdA2yQMtyrz/K+MHE5NA0oaLTjhiSmTNUFOckcmQAl+9PRuXYpgVa5UukkSztNLlbn4xOi2ZvZ4B0jtSg57AeXsl56j36NSCmBqioEdA7N54V3IiwOz~-1~-1~-1 Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1 Referer: https://appleid.apple.com/ Content-Length: 1293 Accept-Language: en-US,en;q=0.9 Same request sent from WebView in another App POST /callbackApple HTTP/1.1 Host: signin.example.com Content-Type: application/x-www-form-urlencoded Origin: https://appleid.apple.com Accept-Encoding: gzip, deflate, br Cookie: ga=GA1.3.439982965.1669661343; _gat=1; _gid=GA1.3.712268364.1669661343; signin-cookie="39fd5b51e0350b24" Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1 Referer: https://appleid.apple.com/ Content-Length: 1448 Accept-Language: en-US,en;q=0.9 And the response to the requests above is always the same, a blank HTML page as shown below with some scripts to update the opener and redirect user back to my website. Note that the script self.close() always works, but window.opener.location.replace(redirectUri) only works when it's inside of Safari or Chrome browser but not in Webview opened by some other application. Response body content: ... <script type="text/javascript"> var redirectUri = 'https://example.com'; redirectUri = redirectUri + "access_token=" + "${accessToken?no_esc}" + "&token_type=apple"; [#if nickName??] redirectUri = redirectUri + "&nickName=" + "${nickName?no_esc}"; [/#if] redirectUri = redirectUri + "&_eventId=loginFromApple" + "&execution=" + "${execution?no_esc}"; if ( window.opener ) { window.opener.location.replace(redirectUri); self.close(); } </script> ... I'm not sure could it be related to some security update within Webkit https://support.apple.com/en-us/HT213412 but we started to see this issue after the iOS version mentioned in the post. Any help would be much appreciated, thanks.
Replies
0
Boosts
0
Views
2.7k
Activity
Nov ’22
Extract images loaded in a WKWebView
Related: https://developer.apple.com/forums/thread/47176 Hey all, I have a WKWebView running in the background of a SwiftUI app which loads webpages that have images in them: <img src="…" /> and would like to extract those image data from the WKWebView for using in my SwiftUI app. The app is supposed to run on iOS and macOS (sandboxed). I have a working solution of this, where I use WKWebView's evaluateJavaScript() to get the URL in the src attribute of the img-tag and then download that url in Swift to a Data object for further processing. While this solution works, it requires fetching the image a second time, which at best adds network load and at worst returns a different image. There is the option of re-rendering the img element to a canvas, extracting the ImageData from there using Javascript, and returning the blob to Swift. According to SO, rendering an img element to a canvas can disturb the image and this seems like an unstable workaround at best, so I have been looking for alternatives of directly getting the image from WKWebView. Are any of the following ideas feasible to extract image data from a WKWebView? Cache: Use WKWebsiteDataStore to fetch a WKWWebsiteDataRecord including the cached images (see here). Or could the image be showing on the WKWebView but not be saved in cache? Webarchive: Create a webarchive of the WKWebView (see here) and extract the image from there. Is there any documentation on parsing .webarchive files? Intercept network requests and responses: When using Safari web inspector's Network monitor, I can see all network requests and responses (including images). However, when using WKNavigationDelegate's method for intercepting WKNavigationActions (see here), I do not see image requests. Is there a way to see all network requests of a WKWebView including requests that load images into an img-element? Thank you! Cheers, Anton
Replies
0
Boosts
2
Views
1.7k
Activity
Oct ’22
JavascriptCore
let req_url = new URL('http://xxxxxx') Javascript execution is interrupted when creating an address via new URL in JavascriptCore
Replies
0
Boosts
0
Views
734
Activity
Oct ’22
window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable returns false in iOS 15.4+
I have a mobile app which is uses Web authentication PublickKeyCredential api provided by WebKit to authenticate users and use oauth token from the response to login to the app. Since iOS 15.4 released this following snippet is returning false window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable Please provide a workaround or let me know when this will get fix in WebKit
Replies
1
Boosts
0
Views
1.3k
Activity
Oct ’22
Segmentation fault 11 when implementing WKScriptMessageHandlerWithReply
Hi, I'm trying to implement the async handler of WKScriptMessageHandlerWithReply -> see yellow box in this reference. This is the method signature: func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) async -> (Any?, String?) But I end up with a Segmentation fault: 11 compilation error. I'm compiling with Xcode 13.4.1 (13F100). Did anybody successfully use this API or now a solution to fix it?
Replies
1
Boosts
0
Views
1.5k
Activity
Oct ’22
Using WKScriptMessageHandler to receive sensitive data
My MacOS application has a webview and I've been subclassing WKScriptMessageHandler to handle several messages received from the javascript code. For a new feature I would like to save user's password in the Keychain, to do so I need to send the password from the Javascript to the Swift codebase. The javascript code would be something like this: window.webkit.messageHandlers.loginData.postMessage({username: 'john', password: 'p@ss!123'}) Before implementing this approach I would like to know if there are any security vulnerabilities that I should know about. The sensitive data is being sent from the Javascript to the Swift code, so I wonder if it would be possible for someone to intercept it or getting the sensitive data somehow.
Replies
0
Boosts
0
Views
1k
Activity
Oct ’22
WKWebView JS Execution in test target
My team has a set of XCTestCases which create a new instance of WKWebView, execute some javascript with it, then assert some conditions afterward. Beginning with iOS 16, these tests never succeed because it seems like the WKWebView is experiencing some sort of crash or malfunction in its content process. When executing a single test of the type above, the following is present in the console: [Process] 0x142481000 - [PID=0] WebProcessProxy::didFinishLaunching: Invalid connection identifier (web process failed to launch) [Process] 0x142481000 - [PID=0] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=Crash [Process] 0x7f7d86008220 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::processDidTerminate: (pid 0), reason=Crash [Loading] 0x7f7d86008220 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::dispatchProcessDidTerminate: reason=Crash [Loading] 0x7f7d86008220 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::dispatchProcessDidTerminate: Not eagerly reloading the view because it is not currently visible I've tried ensuring that an app host is present for the test target these tests execute in and that had no effect. I've tried adding the webview to the apps view hierarchy and that had no effect. In iOS 15 and prior these same tests execute and pass fine. Was there some change in iOS 16 that may have caused this or any ideas on how to rectify this?
Replies
3
Boosts
3
Views
1.9k
Activity
Sep ’22
Disable iOS safari three-finger tap menu
I'm creating a web-based game that has multi-touch support -- users will frequently be using three-fingers (or more) to interact with it. There is no editable text on the page. Is there any way to disable the three-finger tap menu that appears (with cut/paste and undo) in iOS safari? It is pretty distracting and does not provide any value to the user.
Replies
0
Boosts
0
Views
1.5k
Activity
Sep ’22
Safari 15 prompts the beforeunload alert, but does not block navigation
Using the example provided by MDN, the beforeunload event is working in my Safari browser: const beforeUnloadListener = (event) => { event.preventDefault(); return event.returnValue = "Are you sure you want to exit?"; }; addEventListener('beforeunload', beforeUnloadListener, { capture: true }); (I first must click into the window to make sure the browser detects interaction.) if I close the browser window, the alert blocks the window from being closed If I navigate to another page, the alert is shown However, when I navigate to another page, the alert does not block navigation. I am taken to the new page with the alert still being displayed. The alert is then "useless" in the sense that pressing the affirmative or negative buttons dismisses the alert, but has no other effect. This is not the expected behavior in Chrome or Firefox. In these, the page will not navigate or cancel navigation until an alert option is clicked. Is there any work-around? It seems it would be better to not show the alert at all than to show the alert while asynchronously unloading the current page and loading another page. I need to use this event to inform a user they may want to save changes to a document before leaving the page. This was the original use case for beforeunload.
Replies
4
Boosts
1
Views
4.8k
Activity
Sep ’22
M1 M2 webgl.ALIASED_POINT_SIZE_RANGE
I'm currently using gl.points to render sprites (lens flares, explosions, etc) looks like M1 / M2 hardware (ipad, macbook pro) limits the point size to 64. Every other device has minimum of 512, usually 1024, and many even provide 2048. wondering if this is a was a choice or oversight? Also, not sure where to file this type of bug/request as its specific to M1/M2 hardware that affects multiple devices? many thanks, -Dm
Replies
1
Boosts
0
Views
1.3k
Activity
Sep ’22
problem of application execution speed
We've created an webview style hybrid app, using framework based on PHP Compared to Android, it takes twice as much time to load the app on the iphone We've packaged the app using wk webview which based on Safari. Is there any issue that we can check in order to solve such slow running problem on iphone? Best regards, Son Seung Hee ICT Department, Apartners Co.
Replies
0
Boosts
0
Views
791
Activity
Sep ’22