I need to detect user IOS/Safari version and if its below 15 do not render some content for him, cause it doesn’t support under 15 versions I’ve tried to use So i see in the console the Safari version, but not quiet understand how to check if it 15 or below Answer I think i find solution For me works
Tag: safari
Safari: Invalid value for attribute width/height “rem”
I am changing the size of a SVG based on antd breakpoints and I get the following errors. I pass props to a SVG element: Why do I get these errors on Safari ? Chrome and Firefox are ok. Answer SVG’s kind of have 2 sizes, the viewbox size, and it’s render size (style). The viewbox size is usually pixels,
Using window.open in an async function in Firefox and Safari
The application I work on integrates with some platforms with some strict security policies when it comes to user authentication, and as such authentication from our side has to be handled a bit differently as well. The details here aren’t terribly important. I’m working on a new feature now where a user can open some items from a list, but
tag does not work in Safari when using DOMParser
When using DOMParser, <video> tag is not working in Safari, its preview is rendered but without controls and without the ability to play: The code above works as expected in Chrome: But Safari renders this (both macOS and iOS): There are no controls and it’s impossible to play the second video which was produced by DOMParser. Is that some kind
Converting a RegExp constructor to be Safari-compatible
I have this regexp constructed pattern I’m passing a string variable to. This works perfectly in Chrome, but won’t work in Safari. Is there a way I might be able to convert this code to be compatible across browsers? Thank you! Answer You can use The (?!Bw) negative lookahead requires a word boundary position if the next char is a
Javascript media queries not working in safari / iOS
Hope someone can help. The following lines of code work in everything except Safari. Has anyone else discovered how to get Safari to recognise / process these queries? Any and all help gratefully received. Answer Safari does not support resolution, though it looks like the relevant bug has been fixed so it’ll come out at some point in a Safari
Invalid token, state does not match – Auth0 Error Safari only
while using parseHash function in Auth0 library in safari I am getting error Same code is working fine in chrome. what can be possibly done to resolve this issue? Answer After lots of research and article exploration, I finally found a solution to this issue. As auth0 is unable to access state and nonce parameters which are required for forwarding
Match all instances of character except the first one, without lookbehind
I’m struggling with this simple regex that is not working correctly in Safari: It should match each ?, except of the first one. I know that lookbehind is not working on Safari yet, but I need to find some workaround for it. Any suggestions? Answer You can use an alternation capture until the first occurrence of the question mark. Use
Only in Safari: ReferenceError Can’t find variable
Many of my scripts look like this: They work fine on Chrome, Firefox, Edge and Opera but on Safari I get the error: Workaround If I declare the constants before the if statement the code works… …but I don’t understand why and I don’t what to make the constant globally available. Maybe someone can explain to me that Safari-only-behavior. Answer
Insert tag in loop javascript
I want to insert the p tag after each rect tag but unfortunately when I used appendChild the p tag is insert into the rect tag and not after: JS code: I had as a result: ** html Code:** Answer You can use Element.insertAdjacentElement instead of appendChild (which inserts it as a child inside).