mobile-safari

iOS Safari does not recognize url schemes after user cancels

不羁岁月 提交于 2019-12-20 17:42:20
问题 I'm noticing strange behavior in Safari recently. I register a url scheme for the my app, and enter myapp:// into Safari. This launches my app immediately. Then I go back to Safari, and enter myapp:// into Safari again, this time it prompts me "Open this page in "myapp"?" Cancel or Open. My app will launch if I tap on open, and subsequent attempts the same alert shows. If I try tapping on cancel, my app will not launch. which is expected. However, if I enter myapp:// into the URL bar again, I

iOS Safari does not recognize url schemes after user cancels

萝らか妹 提交于 2019-12-20 17:41:59
问题 I'm noticing strange behavior in Safari recently. I register a url scheme for the my app, and enter myapp:// into Safari. This launches my app immediately. Then I go back to Safari, and enter myapp:// into Safari again, this time it prompts me "Open this page in "myapp"?" Cancel or Open. My app will launch if I tap on open, and subsequent attempts the same alert shows. If I try tapping on cancel, my app will not launch. which is expected. However, if I enter myapp:// into the URL bar again, I

detect iframe load error

房东的猫 提交于 2019-12-20 17:39:07
问题 I am loading a user-selected page into an iframe using the src property. If the load fails, I would like to report the problem in terms that will make sense to the user. iframe does not, in general, support onerror according to http://www.w3schools.com/jsref/dom_obj_frame.asp. The page may come from the user's domain, not mine, so I cannot view the content of the iframe. I can set a timeout and cancel it from my onload handler if the load is successful, but it would need to be a long timeout

detect iframe load error

北城余情 提交于 2019-12-20 17:39:00
问题 I am loading a user-selected page into an iframe using the src property. If the load fails, I would like to report the problem in terms that will make sense to the user. iframe does not, in general, support onerror according to http://www.w3schools.com/jsref/dom_obj_frame.asp. The page may come from the user's domain, not mine, so I cannot view the content of the iframe. I can set a timeout and cancel it from my onload handler if the load is successful, but it would need to be a long timeout

Set width of native html5 date and time pickers on iOS devices

萝らか妹 提交于 2019-12-20 17:24:40
问题 I'm using the native date and time pickers with type=date and type=time for the mobile version of a website I'm working on. The input fields are not respecting the css I have, though. Desktop: iOS devices: Essentially I need the two date and time inputs to fill ~50% of the width. This is the html and css I'm using: <div class="arriveWrapper"> <div class="arriveDateWrapper fieldWrapper"> <input class="arriveDate" name="arriveDate" type="date" placeholder="What date?" /> </div> <div class=

Parts of page are invisible when scrolling on Safari 7 with position:fixed elements

柔情痞子 提交于 2019-12-20 12:46:34
问题 There's a pretty big bug in Safari 7 on both Mac and iOS that's hard to find anything on, but is pretty easy to fix. In some situations when using position:fixed, Safari 7 fails to draw part of the page when scrolling. This can be seen at http://ruelculture.com/glitchy.html by clicking on the arrow, waiting a bit and trying to scroll back up. 回答1: To fix this, force hardware acceleration on the disappearing element by adding the following CSS hack: -webkit-transform: translate3d(0, 0, 0); See

Mobile Safari makes multiple video requests

依然范特西╮ 提交于 2019-12-20 11:49:53
问题 I am designing a web application for iPad which makes use of HTML5 in mobile safari. I am transmitting the file manually through an ASP.NET .ashx file hosted on IIS 7 running .NET Framework v2.0. The essential code looks partly like this: // If we receive range header only transmit partial file if (context.Request.Headers["Range"] != null) { var fi = new FileInfo(filePath); long fileSize = fi.Length; // Read start/end index string headerRange = context.Request.Headers["Range"].Replace("bytes=

Change the color of the iOS 7 status bar in Safari and Chrome

时光总嘲笑我的痴心妄想 提交于 2019-12-20 10:33:22
问题 I want to change the color of the iOS 7 status bar in Safari and Chrome. I'm working on a mobile web app and would like it to feel native and right now, I just get a white status bar. 回答1: I'm using this while ios has the bug mentioned in other answers. First I set the statusbar with this: <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> For me, that sets the text white and background transparent. It also floats over my content. Then I have following css: body{

Scale down Mobile Safari viewport width when iPad is in portrait orientation?-

一曲冷凌霜 提交于 2019-12-20 09:38:05
问题 I am working on a website which is designed to work best when viewed in landscape mode on iPad. Everything is in a 1024px wide <div> container. However, I am still required to scale down the viewport so when the user turns the iPad into portrait orientation, the user does not have to zoom out or scroll horizontally to see everything on the page. Currently I have this <meta> tag in my <head> : <meta name="viewport" content="width=1024px, initial-scale=1.0, maximum-scale=10.0" /> Everything

Selecting a file to upload causes mobile Safari to crash

假如想象 提交于 2019-12-20 09:11:46
问题 I've been experiencing behaviour on, at least my iPhone 6 Plus, when using the <input type="file"> to let the user upload an image. <div class="add__from-camera"> <button class="add__from-camera__btn"> <i class="fa fa-fw fa-camera"></i> Add with Camera </button> <input class="add__from-camera__input" type="file"> </div> This rest case results in crashes of the tab about 50% of the time, and in my app about 90% of the time. I was 'lucky' enough to get all of Safari to crash once when the error