Skip to content
Advertisement

Tag: mobile-safari

Safari handles positioned elements differently

The problem is that (in mobile view) chrome renders every thing correctly and as expected, but things go sideways with safari.. down below screenshots taken from both regarding some pages that encountered the issue. chrome screen: Safari screen: As you can see the backgound: radial-gradient() is shifted to the rght a little bit which causes misalignment with indicator(black background and

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

How to get current screen orientation in iOS Safari?

I am trying to get the current screen orientation of iOS however my function which work on chrome dev tool emulator and desktop but it doesn’t work on iOS. Here is my function: and here is how my program rougthly do to detect the screen orientation change and to use the function: I tried using window.screen.height and window.screen.width however it

Mobile Safari, scrollIntoView doesn’t work

I have a problem with scroll to element on mobile Safari in iframe (it works on other browsers, including Safari on mac). I use scrollIntoView. I want to scroll when all content has been rendered. Here is my code: Answer ScrollIntoView does not work (currently). But you can manually calculate the position of the element and scroll to it. Here

Simplest way to detect a pinch

This is a WEB APP not a native app. Please no Objective-C NS commands. So I need to detect ‘pinch’ events on iOS. Problem is every plugin or method I see for doing gestures or multi-touch events, is (usually) with jQuery and is a whole additional pluggin for every gesture under the sun. My application is huge, and I am

Advertisement