mobile-safari

2017 Answer to “How to make background image fixed on iPhone6”

 ̄綄美尐妖づ 提交于 2019-12-20 05:40:13
问题 I have an HTML/CSS webpage with a background image. The image is fixed on desktop and looks great, and the main text scrolls over it as intended. On iPhone6, however, it looks horrible: sometimes, two versions of the photo show up; both versions scroll with the image, rather than staying put, and the second one is stretched to the entire length of the page. I have searched high and low on stack overflow for answers, and none of the answers work: media queries don't appear to work; -webkit

.load() does not work on ipad

杀马特。学长 韩版系。学妹 提交于 2019-12-20 05:17:25
问题 I have simple script to check image, but it is not working properly on my ipad with ios 5.1. In image i receive stream of jpg's, so load must work on each frame (as in big safari), but in ipad it fires only once. May be some suggestions? $('#image').load(function(){ console.log(new Date().getTime();); }); 回答1: It is mentioned on the jQuery official website: Caveats of the load event when used with images A common challenge developers attempt to solve using the .load() shortcut is to execute a

Is there a way to see that a browser window is minimized while the user is switching to the other window on iphone?

自作多情 提交于 2019-12-20 02:37:12
问题 Is there a way to see that a browser window is minimized while the user is switching to the other window on IPhone ? Same about when the browser window becomes inactive by switching to any other application. I've tried to bind to jQuery onfocus , onblur events ( $(window).blur(...); ) but got no callbacks. Thanks! 回答1: I think the closest thing to what you're looking for are the pageshow and pagehide events. In tests I did in iOS 5.1, when switching to another application from Mobile Safari

Profile mobile Safari (iPad) javascript?

陌路散爱 提交于 2019-12-19 15:40:12
问题 Javascript performance on mobile Safari (iPad) is much more sensitive for my application that it is on the desktop. Some operations that work super-smooth on the desktop take a while on the iPad, and I'd like to track down where the bottlenecks are. Is there some way to profile Javascript code on the iPad? 回答1: If you have access to an Android phone, you can profile your application using desktop Chrome's developer tools and a USB cable (very convenient). Android and iPhone behave+perform

Vimeo player JS API is not working in iOS

泄露秘密 提交于 2019-12-19 10:12:16
问题 I'm trying to use the API to play a video, but it only works after you click the play button in the player in iOS. In desktop and Chrome for Android, it is working fine. http://codepen.io/bdougherty/pen/JgDfm $(function() { var iframe = $('#player1')[0]; var player = $f(iframe); var status = $('.status'); // When the player is ready, add listeners for pause, finish, and playProgress player.addEvent('ready', function() { status.text('ready'); player.addEvent('pause', onPause); player.addEvent(

Click event doesnt work in safari mobile for some HTML content

别来无恙 提交于 2019-12-19 10:04:20
问题 In my web app, there is a separate navbar for mobile devices. I want this navbar to collapse when the menu button is clicked or anywhere else in the site is clicked. It already works in any mobile browser but not it safari mobile (In safari also, for home page it works but not in other pages). In other pages, there are some html generated dynamically. It seems that the click event doesn't work for those content. I'd really appreciate a solution for this problem. the code is as follows. I've

In iOS8 Safari, readonly inputs are handled incorrectly

被刻印的时光 ゝ 提交于 2019-12-19 06:17:10
问题 In Safari, iOS8, focusing in a date or a time input opens up the date or time picker and allows editing the content of the readonly input. When focusing in a text input, a toolbar appears at the bottom with previous, next and Done buttons, and not going away until Done is tapped, or another input on the page is tapped. When the input is focused programatically from Javascript, nothing is happening, but: if a touchstart event listener is added to some part of the page, touching anywhere will

iPad Safari IOS 5 window.close() closing wrong window

爷,独闯天下 提交于 2019-12-19 05:44:42
问题 We have an iPad application that's working on our older iPads. We open external links using var x = window.open(url) at the end of the day, when the user closes this part of the app, we go through all the windows it opened and do x.close() for each one and everything is okie dokie. Testing on the new iPad with IOS 5 and the lovely tabs, opening the new windows (although now they open as tabs) is fine, but doing x.close() doesn't seem to necessarily close x, it may close window y or z. Doing x

iOS mobile safari - the bottom bar covers my footer

﹥>﹥吖頭↗ 提交于 2019-12-19 04:07:13
问题 iOS mobile safari has the address and bottom nav bar that come into view when you scroll upwards, and hide/minimize when you scroll down. I have a footer in my UI that gets hidden by the bottom nav bar, and I'm not sure what the best way to go about fixing this is. I could use javascript to detect the browser I'm using and then edit the css accordingly, but I wanted to know if there was a better, CSS only solution. EDIT: I found a few examples of sites that do what I need, but I can't seem to

resume webapp from previous position?

喜夏-厌秋 提交于 2019-12-19 03:23:02
问题 I have a webapp which stores the users data as they progress so that if they click on an external link while in the home screen app mode on an iPhone and leave the app to view a webpage or similar. When they return the webapp how will resume at the same position.? currently its not going to same position, its redirecting to home page i want its resume from previous position.. How to do this, any idea? 回答1: It's not (for the most part) possible for a web app to resume where it left off,