mobile-safari

Get current position of the viewport in Mobile (iPhone) Safari

独自空忆成欢 提交于 2019-12-12 08:22:30
问题 I'm trying to position a div in the center of the iphone viewport. Basically so that when you hit an image, it pops up in the middle of the screen regardless of where you had scrolled to on the page before you clicked. It's not as simple as just making it position: fixed; as that will cause the origin to be the top of the page, not the top of the viewport. I also can't do something like detecting scroll events and keeping a track of where I'm currently scrolled to, as the Javascript I'm

iPhone Web App disable cache

末鹿安然 提交于 2019-12-12 08:04:34
问题 I have built an iPhone webapp using PHP. The main (and only) page includes the apple-mobile-web-app-capable and apple-touch-fullscreen meta tags so that it can run fullscreen once added to the homescreen. However, it seems every time I launch the app from the homescreen, the cache version of the page is used instead of refreshing the page (and of course, I need the page to be updated on startup, and cannot use Ajax here - need to dynamically authenticate the user with SSO phpCAS). I did not

iOS 8.3 Mobile Safari disable emoji rendering

做~自己de王妃 提交于 2019-12-12 07:55:34
问题 Apple released iOS 8.3 recently. They added a lot more Emojis and all of them are rendered in mobile safari now. For Example ▶ will be rendered to an emoji icon. is there a way to disable emoji rendering? For example via CSS or JavaScript? 回答1: Yes you can disable these on a character by character basis by using the proper variant glyph. The following example will render the black right pointing triangle as emoji as no variant is specified. ▶ However, if you specify the proper variant glyph

Container height issue using flexslider 2 only on IOS device

南笙酒味 提交于 2019-12-12 06:28:46
问题 I have a flexslider slideshow with an image and a spot for featured text. On the full site it starts with the image to the left and the featured text area to the right (floated). Both of these items are in a containing div with a black background. When the screen is shrunk down I have through media queries made the image go on top and the featured text area go below it and both are 100%. They are relative so content below it changes position based on the amount of text in the featured text

Loading responsive website inside iframe

江枫思渺然 提交于 2019-12-12 03:59:40
问题 I am loading a responsive website inside a dynamic iframe on Mobile Safari, I set the width of the iframe via JS to the viewport width and you can see the responsive layout for a second, then the iframe "explodes" to the right and down and the desktop version is loaded. I tried this with a couple of websites and the results is the same. Why is it loading the desktop version and how can I force the iframe to load the mobile version instead? Update : It seems it might be due to the library I am

iPhone: Close Safari and return to homescreen using a script?

本秂侑毒 提交于 2019-12-12 03:29:32
问题 I have a .html-file that loads a javascript when loaded. I use this to turn on/off electronics in my home. Currently I have saved the link on my homescreen (iPhone), and I have set the window to close automatically after 1 second of it being opened (which is enough for my javascript to run). However, I think it would be much more cool, if I somehow could get Safari to close after closing the window. In that way I could return to my homescreen, so I wouldn't have to touch the homebutton, and

jQuery .play() doesn't work on mobile Safari

只愿长相守 提交于 2019-12-12 03:27:40
问题 I'm using JQuery and I tried this code <video id="videoPopUp1" poster="img/xxx.png"> <source src="video/xxx.mp4" type="video/mp4"> </video> $('#playBtn1').click(function () { $("#playBtn1").hide(); $('#videoPopUp1').get(0).play(); }); $('#videoPopUp1').click(function () { if (this.paused == false) { this.pause(); $('#playBtn1').show() } else { this.play(); $('#playBtn1').hide() } }); but on Iphone (Safari, iOS 9.3.1) and Ipad (Safari, 8.1.2) it doesn't work. It works fine on all other

Webpage on mobile safari is not scaling to fit viewport?

半城伤御伤魂 提交于 2019-12-12 02:25:43
问题 I created a simple using only ems and percentages as css units. It is a container div wrapping some elements and it's center in the page with the following code: position: absolute; top: 50%; left: 50%; margin-top: -25.875em; margin-left: -38.187em; padding: 0; width: 76.375em; height: 47.75em; It works great in all browsers except for the iphone and ipad. It renders only the top right corner of my page. I added : <meta name="viewport" content="maximum-scale=2, minimum-scale=.2, initial-scale

File API not supported on Safari Browser

Deadly 提交于 2019-12-12 02:02:52
问题 I am using the following code (below) to display an image in my view. When I try it using my iPhone and press on Load, it says that the File API is not supported yet by the browser. What can I do alternatively to do load the image and display it? My objective is to take an image from the phone, manipulate it, and then store it on the phone of the user. CODE: <html> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <title>Show Image Dimensions Locally</title> <style

Scrolling height bug using skrollr.js on safari ios7

允我心安 提交于 2019-12-12 01:13:03
问题 I've been racking my brain trying to understand what I'm doing wrong. I'm using prinzhorn's skrollr.js for scrolling animation effects on my portfolio redesign and it works great on desktop and even chrome for ios7. But...when loading in safari ios7 it scrolls only so far (to the brand logos section) then stops before reaching the end of the page. Only when I change the orientation to landscape, then back to portrait does it correct itself. I've also noticed some strange inconsistencies when