mobile-webkit

CORS / xhr.getRequestHeaders

 ̄綄美尐妖づ 提交于 2019-12-13 14:08:30
问题 Greetings, I am trying to use CORS (http://www.w3.org/TR/2009/WD-cors-20090317/#access-control-allow-methods-header) for an application on Safari, and when I try to read the response headers from the XMLHTTPRequest, I only receive the Content-Type. None of the other quite standard headers gets through, and I cannot figure out how to get this to work. Anyone would happen to know how to fix this issue? Could this be a WebKit bug? Edit here is the config i use with nGinx: add_header Access

Using iScroll prevents the keyboard from showing on my device

◇◆丶佛笑我妖孽 提交于 2019-12-10 19:10:10
问题 I am using iScroll for providing iPhone style scrolling. But, when clicking on the textboxes, the keyboard does not show up. While trying to find the possible cause, I found that removing the iScroll script, makes it work normal, but in that case I miss the scrolling functionality. Is this a bug in iScroll. If yes, is there a tested work-around? Or is there any alternative for iScroll? Thanks in advance. 回答1: At least in iScroll 4, you can add this code to enable clicking of input fields. See

sms url scheme not working on IOS5

我只是一个虾纸丫 提交于 2019-12-10 18:36:17
问题 In my web app targeted to iphone and android, I have a "TEXT ME" button which when clicked, leads the user to sms with number and body prefilled. This works fine in iphone prior to ios 5. In IOS 5, clicking on the button does not lead to sms applicatin. Is there any change in IOS 5 for sms url scheme which i am missing. Here is what i am using sms:2062142930?body=Mobile%20Inquiry& Thanx zAfar 回答1: Perhaps try this without a message body. The Apple URL scheme reference [1] says this about text

How to enable user select in a readOnly html element on iPad safari?

蓝咒 提交于 2019-12-10 03:54:21
问题 I have an HTML element in my web page on iPad and it must be read only to prevent users updating the content,using readOnly='readOnly' makes the element unselectable and text content of the element can not be copied at all. is there any way to make the element read only and the user can select/copy the text content???? 回答1: just i removed the readOnly attribute and added the following onkeydown and oncut events to simulate readOnly behavior <input type="textarea" onkeydown="event

CSS animation visibility: visible; works on Chrome and Safari, but not on iOS

时光总嘲笑我的痴心妄想 提交于 2019-12-07 21:10:26
问题 In Chrome (19.0.1084.46 m on WinXP) and Safari (5.1.7 on OS X 10.7.4), this fiddle http://jsfiddle.net/Vkpwm/ works; clicking on the google image shows/hides the green div, but when loading it on my iPhone, and on the iPhone simulator in xCode (by using the direct page http://jsfiddle.net/Vkpwm/show/), the div never gets shown again. Removing the line "-webkit-transition: 0.5s;" from the css makes it work, but obviously breaks the animation. Removing the line "visibility: hidden;" also makes

CSS animation visibility: visible; works on Chrome and Safari, but not on iOS

守給你的承諾、 提交于 2019-12-06 11:27:42
In Chrome (19.0.1084.46 m on WinXP) and Safari (5.1.7 on OS X 10.7.4), this fiddle http://jsfiddle.net/Vkpwm/ works; clicking on the google image shows/hides the green div, but when loading it on my iPhone, and on the iPhone simulator in xCode (by using the direct page http://jsfiddle.net/Vkpwm/show/ ), the div never gets shown again. Removing the line "-webkit-transition: 0.5s;" from the css makes it work, but obviously breaks the animation. Removing the line "visibility: hidden;" also makes it work, but means that the div is still there and events get fired on it (e.g. the alert is fired

how to call parameterized javascript function in the WebKit?

南笙酒味 提交于 2019-12-05 21:51:30
I am trying to pass 2 parameters to a javascript function.This code webview.loadUrl("javascript: function_to_call();"); works fine without parameters but i couldn't use it with parameters. This is javascript junction : function changeLocation(_lon , _lat){ var zoom=16; var lonLat = new OpenLayers.LonLat( _lon , _lat ).transform( new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()); map.setCenter (lonLat, zoom); } And this is how i call it from java : webView.loadUrl("javascript:changeLocation( -0.1279688 ,51.5077286 );") ; Edit: I couldn't find the problem and i changed my

-webkit-overflow-scrolling breaks absolute positioning

我与影子孤独终老i 提交于 2019-12-05 06:33:54
I am building a page that needs to have some elements which stick to the top of the page when they would otherwise be scrolled off the screen. I managed to do this using position:absolute . Everything was working perfectly, but it needed momentum scrolling. I added -webkit-overflow-scrolling: touch to the css of the scrollable area. This broke everything. My sticky elements with position:absolute are now just scrolling with the rest of the content. My question is this: Why does -webkit-overflow-scrolling: touch affect absolute positioning, and is there a way around this? UPDATE: I added an

How to enable user select in a readOnly html element on iPad safari?

假如想象 提交于 2019-12-05 05:06:34
I have an HTML element in my web page on iPad and it must be read only to prevent users updating the content,using readOnly='readOnly' makes the element unselectable and text content of the element can not be copied at all. is there any way to make the element read only and the user can select/copy the text content???? aomar just i removed the readOnly attribute and added the following onkeydown and oncut events to simulate readOnly behavior <input type="textarea" onkeydown="event.preventDefault();event.stopPropagation();return false;" oncut="event.preventDefault();event.stopPropagation()

Is there a way to make the WebView widget use Chrome instead of the builtin WebKit browser on Samsung/LG Android Phones?

霸气de小男生 提交于 2019-12-05 00:59:06
问题 When using the WebView in an Android application - Android will utilize different browsers under the hood in order to render the web page. For example - pre Android 4.4 on Samsung devices will use the WebKit based browser that comes on Samsung stock phone (even if Chrome is installed and is the default web browser). Google Nexus/HTC phones come with Chrome pre-installed and they will use it to render web content. We have rendering problems with the WebKit browser on Samsung/LG devices with