mobile-safari

JQuery for mobile safari: on() fails

我怕爱的太早我们不能终老 提交于 2019-12-13 05:12:43
问题 I'm trying to change some classes on dynamically generated DOM elements for a mobile web page. My usual method, the jquery on() doesn't pick up the events properly. Neither does "delegate()" , my backup work. I'm using JQuery version "http://code.jquery.com/jquery-1.7.min.js" 回答1: The solution was to add onclick='' to the div element. Not sure why that worked, but it did. – 回答2: Instead of using the on, can't you just write the event as it is? Such as: $(document).ready(function () { }); $

Is it possible to play audio from a local ios library via html5?

匆匆过客 提交于 2019-12-13 05:09:23
问题 Say we have an iPhone that has mp3s synced to it that play normally with the built in ios music player. Can a webpage be coded in a way that if I surf to it using mobile safari, I can see my music library and play the files? If so what APIs etc should I use? 回答1: On iOS, this is not possible. It is possible for Chrome Applications to get access to the local media library; however, iOS (even Chrome on Android right now, actually) do not support this. 回答2: As browser limitations and security

Anti-responsive styling for mobile browser

拟墨画扇 提交于 2019-12-13 04:49:20
问题 I have made a design for a website that is adapated for desktop visitors. Naturally, for mobile visitors, the details get very small. But I want to keep it like that, I don't want the mobile browser to try to zoom in on the website but retain the full width. What is key to accomplish this? 回答1: This should be what your looking for. Place it within the <head></head> <meta name="viewport" content="width=1024, user-scalable=no"> set the content="" to whatever the size of the site is or what you

React app throws 401 error when accessed through safari, but not otherwise

假如想象 提交于 2019-12-13 03:46:47
问题 I have a react app hosted in an s3 bucket behind a cloudfront distribution. This talks to a django server. Login works correctly on all browsers (confirmation that credentials are correct, and no fundamental connection issues). Once logged in, the app redirects to a page that does a simple GET request via fetch (to a url that requires authentication). This works successfully on all browsers on desktop (macos) except safari, which gets a 401 unauthorised error. Similarly, I get a 401

Apple Safari disrupting image url's

白昼怎懂夜的黑 提交于 2019-12-13 03:39:49
问题 Has anyone every encountered this problem: Apple's Safari v5 is disrupting the image urls on one of my magento v1.6.1 sites within the same domain. The site in question is http://store.guns-aws.com When analyzing the lack of images, I have noticed that image urls are being disrupted from www.guns-aws.com to www.guns -aws.com [notice the space] Ironically Safari 4 does not have this issue and the same site works perfectly fine with IE, FF, Opera and Chrome. Thinking its a javascript error, I

iOS Safari pauses animation on window.location.href = …?

纵然是瞬间 提交于 2019-12-13 02:46:27
问题 I have the following code from https://codepen.io/anon/pen/ZNLyGe which displays an waiting-bar animation when the user clicks an icon to navigate to another part of the same website. The onclick Javascript uses: window.location.href = strNewURL; It works fine on desktop browsers but on iOS, Safari freezes the animation as soon as it hits the window.location.href line. Is there some way to prevent iOS Safari from stopping that animation? HTML <div class="dvProgressBarInfinite" id=

JS event to see if Mobile Safari has been closed?

依然范特西╮ 提交于 2019-12-13 02:33:04
问题 Is there a JS event that gets triggered if a user closes Safari on their iPhone? onunload works if a person leaves a page, but is not called when the browser is closed. My hunch is, no, there is no event triggered, as closing Mobile Safari merely 'minimizes' it rather than actually closes it. Can anyone confirm? 回答1: Not exactly, but look in the comments for the pagehide event: What event fires when a WebKit WebApp is "terminated" 来源: https://stackoverflow.com/questions/5554479/js-event-to

Catch browser closing event in safari running in iPhone, iPad etc

筅森魡賤 提交于 2019-12-13 02:17:15
问题 How do i capture the browser closing event in safari running in iPhone ,iPad, itouch etc. as the onbeforeunload event will not work with safari? Many thanks, Hariprasath 回答1: Safari for iOS supports the unload event, which should do the trick. You can find out more information about supported Safari for iOS events here: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html Hope that helps. 来源: https:/

iOS 8 Safari and jQuery-minicolor: cannot parse response

会有一股神秘感。 提交于 2019-12-13 01:28:17
问题 I want to use jQuery-minicolor and angular-minicolor for a simple colorpicker. Everything is fine in most cases, except for when visiting the website with iOS Safari: in the debug mode, I can see there is an error: [Error] Failed to load resource: cannot parse response (jquery.minicolors.css, line 0) which points to the .css file on my server (which was obtained from https://github.com/claviska/jquery-minicolors/blob/master/jquery.minicolors.css). I wonder if this can be fixed? 来源: https:/

Mobile Safari - Html download link opens tab instead of downloading file

烂漫一生 提交于 2019-12-12 22:47:27
问题 I'm working with a webapp that has a link to download an xml file. As in, click the link, browser downloads the file. The file downloads as expected from Chrome/FF/Safari on my desktop. It also works from FF when I spoof my User Agent to be an iPad. But when clicked from Mobile Safari on an iPad, the link navigates the browser to a new page and tries to display the xml as html, without downloading anything. Currently the HTTP Response contains the following headers: Content-Disposition