mobile-safari

MobileSafari not returning the right image size info via JavaScript

心不动则不痛 提交于 2020-01-11 08:31:29
问题 I have an HTML test page for this issue here. For some reason MobileSafari is reporting the Image.width/height properties of any image with more than 1700 pixels as half its value . That is, the width property of the JPG is, say, 2000 but MobileSafari JavaScript reports it as 1000. If I try the same code with a 1700px-wide image I get the correct width. The test I did loads two images (same image in different dimensions) and displays the JavaScript size values. I tried in: Chrome 22, Safari 5

Sign in with Linkedin doesn't trigger callback on iOS Safari when using the JS API

核能气质少年 提交于 2020-01-11 08:19:15
问题 I'm using SignIn with Linkedin on a website, via the JS API. It works fine on the few desktop browsers I've tested (Chrome and FF on Windows, Safari on MacOS), and on a slightly outdated Android Chrome. But it fails on iOS Safari (I use iOS 7). The issue is that on iOS Safari, the callback passed as argument to IN.User.authorize is not executed. The line looks like this: IN.User.authorize(this._getProfileData, this); _getProfileData is executed on the desktop browsers mentioned above and

iOS Safari 8 input overflow scroll

匆匆过客 提交于 2020-01-10 09:53:28
问题 I have an issue with form fields on mobile Safari, version 8.1. This appears to be a bug with all version of Safari 8 on mobile. When you type text into an input and that text is then longer than the input itself, the cursor keeps moving right as you type - this is correct. The problem is when you hold to select and try to move left to the text that is hidden, you cannot scroll. Likewise, if you select outside the input, you cannot scroll right to view the hidden text. Your only choice is to

How to find (in javascript) the current “scroll” offset in mobile safari / iphone

▼魔方 西西 提交于 2020-01-10 08:50:48
问题 I'd like to know the x/y offset of the how far the user has "scrolled" within the viewport in mobile safari on the iphone. Put another way, if I (through javascript) reloaded the current page, I'd like to find the values I'd need to pass into window.scrollTo(...) in order to reposition the document/viewport as it is currently. window.pageXOffset always reports 0 jquery's $('body').scrollTop() always reports 0 events have a pageX, but this won't account for the scrolling of the page that

iOS6 Safari orientation change bug?

依然范特西╮ 提交于 2020-01-10 02:33:28
问题 I'm having an rare behavior in Safari and iOS6. When changing from landscape to portrait, the viewport is resized, but it seems that is no correctly positioned horizontally. It's displaced exactly 128px to left. I'm able to reproduce this behavior with an iPad3 in iOS6 going to www.google.com If you change the display property of the html like this: document.querySelector("html").style.display = "none" document.querySelector("html").style.display = "block" the viewport returns to origin and

Tell iPadOS from macOS on the web

限于喜欢 提交于 2020-01-09 19:56:29
问题 The user agent of Safari on iPadOS beta is at this point exactly the same as Safari on macOS. Is there any other way to tell an iPad from a Mac? iPad running iOS Mozilla/5.0 (iPad; CPU OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 Mobile/14G60 Safari/602.1 iPadOS, developer beta 1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 iPadOS, beta 2, simulator Mozilla/5.0 (Macintosh; Intel Mac OS X 10

CSS Columns Bug — breaks in mobile while using the :checked pseudo class

假如想象 提交于 2020-01-06 12:42:21
问题 I am building a portfolio website that uses only CSS3 to display a grid and filter out thumbnail images. You can see what I've done here. I got the filter functionality to work by using this tutorial and using the :checked pseudo class. The grid is made using css3 columns to create a seamless responsive photo grid. I used Chris Coyier's example. Everything works in most modern browsers, but it breaks in mobile safari for the iPhone. Upon further testing, it seems to also break in the Sleipnir

Is it possible to use double quotes in CSV files on iPad?

╄→尐↘猪︶ㄣ 提交于 2020-01-06 08:17:19
问题 I am having issues with the special CSV interpreter (no idea what its called) on iPad mobile browser. iPad appears to reserve the character " as reserved or special. When this character appears the string is treated as a literal instead of seperated as a CSV. INPUT: 1111,64-1111-11,Some Tool 12", 112233 Give the input above, the CSV mobile-safari display shows ([] represents a column) [1111] [64-1111-11] [Some Tool 12, 112233] Note that the " is missing. Also note that 112233 is not in its

Debug an External Javascript against Documents inside Mobile Safari

纵然是瞬间 提交于 2020-01-06 04:21:09
问题 This question is related to my earlier question How to Debug Javascript in IOS Action App Extension. Basically, I am developing an mobile safari extension, and part of the work is to develop a javascript (operating on top of "document" provided by mobile safari) to run inside the app extension. However, I have not found a way to debug a javascript file inside an app extension. Now, I am trying to ask the question a bit differently - given mobile safari on a page, can I somehow run an external

Why mobile Safari touchEvents have negative timestamp?

喜你入骨 提交于 2020-01-05 09:06:24
问题 I use timestamps to accurately detect long press by comparing event timestamps with the requestAnimationFrame passed timestamp. By documentation both of these timestamps should be: This value is the number of milliseconds elapsed from the beginning of the current document's lifetime till the event was created. https://developer.mozilla.org/en-US/docs/Web/API/Event/timeStamp I've created a jsFiddle, if I click with a mouse on a desktop, it shows positive numbers. If I open on an iPhone 7+, it