mobile-safari

iOS Safari image rendering issue

喜欢而已 提交于 2019-12-10 20:03:11
问题 I've been experiencing some very strange behavior in Safari on iPad. There's a large image that gets rescaled and position on orientation change. This is probably beside the point, but it's fine in portrait and "broken" in landscape. Here's how it's broken: There's a large stripe running horizontally through it. Applying some CSS, I can see that I'm actually looking at the container element through the stripe (usually about 40 pixels high, and running horizontally across the image). To make

iOs Safari: clear input type date

江枫思渺然 提交于 2019-12-10 19:45:19
问题 I made a .NET mvc application in which i have an field. On iPhone (in Safari), once i click on this field, a native iOs datepicker appears. It works, i can select a date, confirm it (with "Done" button) and submit the form. Then I access again to this page: the date is already valorized; For example, i will have this: <input type="date" value="2012-06-30"> I can change it but i can't Clear it with the relative button . The date is still in the field. If i put a new date in this field and then

Close iPhone webapp

扶醉桌前 提交于 2019-12-10 18:13:40
问题 I want to just close or minimize (hide) full-screen iPhone web application. How to do this? window.close(); doesn't work. 回答1: You can't. You cannot quit the browser from JavaScript. But you could try to make the browser crash... not that this would be a good idea. 回答2: I'm not really sure why you would want to do this, but you cannot . 来源: https://stackoverflow.com/questions/10342230/close-iphone-webapp

SFSafariViewController Title

拜拜、爱过 提交于 2019-12-10 18:13:28
问题 I have SFSafariViewController working fine in Objective-C, but have not been able to set a separate title (other than the default URL). Does anyone know how to set a separate title? 回答1: No, you can't set the title for SFSafariViewController. It's a controller provided for showing the default view of your web page. If you want to set the title on your web view then you can use WKWebView inside your own controller and can provide all the customisation there. 来源: https://stackoverflow.com

SoundCloud's connect with Facebook not working in iOS

左心房为你撑大大i 提交于 2019-12-10 17:47:26
问题 I'm trying to integrate my iOS app with SoundCloud. I've registered an app at "http://soundcloud.com/you/apps" and got the app ID and secret key in order to compose the auth URL: "https://soundcloud.com/connect?client_id=da3beb496ca5bd92e2ae39a4bf775cca&redirect_uri=rocksteady://oauth2&response_type=code" I simply made a UIWebView load a request with that very url. After pushing the "Connect with Facebook" button app redirected to the facebook login page. After logging in the Facebook I got

Strange Click Event Bubble on iPhone safari that it stop before bubbling to document.body

匆匆过客 提交于 2019-12-10 17:41:02
问题 I have bind a click event as document.body.onclick = function(){alert("aaa")}; It do good both on android or chrome on IOS whatever element I click. But it does not trigger on iPhone safari while click the elements except a and img element. But it can bubble to body while binding the touchstart event. At last, I have to add to div(#main) to contain all my elements, and then bind the delegate object on this div. document.querySelector("#main").onclick = function(){alert("aaa")} So I am

How to run mobile version of a website?

孤街浪徒 提交于 2019-12-10 17:24:47
问题 There are two common ways to run mobile version of a website: Detecting the mobile browser by server-side scripting to display mobile theme. Having a separate subdomain such as m.domain.com or mobile.domain.com. Which is better in action? In both cases, I think mobile search engines fairly index the mobile website. What are pros and cons for each method? 回答1: Option 1: This is more user-friendly for a few reasons. The biggest is probably link sharing and bookmark syncing. If a user on a

Safari implementation of indexeddb is very slow

无人久伴 提交于 2019-12-10 17:22:16
问题 Apple recently added support for indexeddb in both iOS8 Safari and Safari 7.1 on OSX. I am attempting to use this in a web application that stores about 65,000 records in indexeddb and queries them using some compound indexes. It's working for me, but compared to Chrome's implementation of indexeddb, it's really, really slow. To be specific... a query that takes 2ms against Chrome's indexeddb takes 500ms against Apple's indexedbb. This particular query is using a compound indexeddb index (2

Safari not requesting srcset images on resize

懵懂的女人 提交于 2019-12-10 17:14:32
问题 I want to provide responsive images, for that I use srcset attribute. <img src="https://res.cloudinary.com/demo/image/upload/w_480/group.jpg" alt="" srcset=" https://res.cloudinary.com/demo/image/upload/w_480/group.jpg 480w, https://res.cloudinary.com/demo/image/upload/w_750/group.jpg 750w, https://res.cloudinary.com/demo/image/upload/w_1334/group.jpg 1334w, https://res.cloudinary.com/demo/image/upload/w_1536/group.jpg 1536w, https://res.cloudinary.com/demo/image/upload/w_2048/group.jpg 2048w

mailto links in iPhone are adding plus signs instead of spaces

旧城冷巷雨未停 提交于 2019-12-10 16:58:39
问题 I have a web app that I'm building right now that needs to use a mailto: link for the tell-a-friend portion. The message body was too long for a URL, so I had it in a hidden form and am sending the form via jQuery. Everything is working brilliantly, except that it is adding + signs where the spaces should go. I've tried unescaping, replacing "+" with spaces, but as soon as it gets to "mailto_form.submit();", the + signs get added to the subject and body. Thanks in advance for any suggestions!