When I focus on text box of hybrid telerik app in iPhone whole screen goes upsidedown. My fixed header position changes. Can anyone provide an explanation as to why this occurs?
document.body.style.overflow = 'hidden';
document.getElementById('loginView').scrolling = 'no';
$("body").addClass("not_scroll");
Related
I am developing an iPhone app using Titanium Alloy.
My problem is that I would like to change the backgroundImage of rightNav button.
I am using the rightNav button as a Filter button. My Filter button is placed in a window which also has a table. Once the filter button is clicked a new window is opened where the user can make some selections. Once the selection is made, the table on the previous page is refreshed based on the selections made and I would like to change the backgroundImage of the rightNav button to show that some selections have been applied. But I am unable to do so.
My code :
if ((screenType === "parentWindow") {
$.rightNav.visible = true;
$.rightNav.backgroundImage = "/images/buttons/filterOff.png";
} else if ((screenType === "childWindow")) {
$.rightNav.visible = true;
$.rightNav.backgroundImage = "/images/buttons/filterOn.png";
}
The backgroundImage of the rightNav button is set first time and then it is not changed. I have tried to make it null and then set it again but it does not work.
Please help.
Other details :
Titanium Command-Line Interface, CLI version 4.0.0, Titanium SDK version 4.0.0.RC, Mac OS X 10.10
Thanks
Try using the image property .
I'm having an issue with textfields in Sencha Touch 2, this is only occurring in iOS 7 and working fine in iOS 6 and Android.
The issue is when you tap a field the keypad opens but the cursor disappears, it should be focus on selected textfield but it does not. You have to tap the textfield again to focus.
I have checked this issue on iOS 6 and android (on devices as well as on simulators), working fine but not on iOS 7 only.
Is anybody having this issue...?
Is this a bug in sencha or should i missing something, please advice.
Thank you..
I have found this to be directly related to two things:
centered: true
pack: 'center'
When I removed those lines, my app started playing nice. The challenge is to find an alternative way to center your panels.
I spent days figuring this out. Actually there is a problem with Sencha understanding the ViewPort height. In your index.html add a script block with the following code
if (window.device && parseFloat(window.device.version) == 7.0) {
document.body.style.paddingTop = "20px";
Ext.Viewport.setHeight(Ext.Viewport.getWindowHeight() - 20);
}
This does two things for you
It Provides enough space on Top to display the activity bar
It sets the Viewport height to be that of screen height, irrespective of the keyboard being present or not.
Also, If your app works in Portrait and Landscape mode, you will need to add these lines in your Viewport.js (or Main.js)
initialize: function(){
Ext.Viewport.on('orientationchange', 'handleOrientationChange', this, {buffer: 0 });
},
handleOrientationChange: function(){
try{
if (parseFloat(window.device.version) == 7.0) {
Ext.Viewport.setHeight(Ext.Viewport.getWindowHeight() - 20);
}else{
Ext.Viewport.setHeight(Ext.Viewport.getWindowHeight());
}
}catch(e){
// do nothing
}
},
And Yes, Make sure they Keyboard Bounce is TRUE in true (if you are using cordova). This will make sure your field does not get hidden.
Hope this works for you.
add height="device-height" in viewport meta tag, fixes the issue.
ios7 issues with webview focus when using keyboard html
In an asp.net web application - without writing a mobile specific site, is there anyway of stopping double tapping on an iPhone, from zooming? The default behaviour should be to produce a postback (and is on my Android, and in normal web browsers) - but the iPhone appears to take this as a zoom command.
So my query is, how do I get the iPhone/iPad to recognise that I actually want to do a postback?
Thanks for any help,
Mark
if anyone is interested, my specific issue was, I had a popup on each cell of a grid (onmouseover...) - however, to start the postback, you have to actually click on a cell in the the grid, rather than hover over it. However, "hovering" on an iPhone is basically "clicking" on everything else - so when people were clicking, all that was happening, was the popup was showing again, and no postback was carried out - meaning people could not progress.
Solution was to detect for iPhone/Pad/Touch, and not output the "onmouseover" if those devices were detected - then the underlying click was available, and would do as designed.
Code to check for iPhone etc:
Dim iphone as Boolean = False
Dim userAgent = HttpContext.Current.Request.UserAgent.ToLower()
' iPhone is there
If userAgent.Contains("iphone") Then
iphone = True
ElseIf userAgent.Contains("ipad") Then
iphone = True
ElseIf userAgent.Contains("itouch") Then
iphone = True
End If
Hope this helps anyone else with this specific issue,
I am using Adobe Flash Professional CS5.5 to build an iPhone app with AIR 3.
I am implementing the FacebookMobile flash API which uses a StageWebView to display the login form. Everything works fine when I test my app locally (on my computer) but the app always crashes on iPhone as soon as I click on the "Email" text field to type my email and be able to login. The iPhone's keyboard is shown and then my app simply freeze forever (I don't have time to write any character in the text field).
Am I doing something wrong with my StageWebView? I can't figure out why this is happening.
public var webView:StageWebView;
Here is the code where I initialize the StageWebView :
webView = new StageWebView();
webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );
FacebookMobile.login(handleLogin, stage, permissions, webView);
Any help would be appreciated.
I'm having the same problem too.
When editing a text field, the keyboard appears, but it freezes straight.
Note: when I used CS5 away back it never happend.
var webView:StageWebView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle(10 , 64, 300, 400 );
webView.loadURL( "http://ghasan.yoo7.com/h54-page" );
button_1.addEventListener(MouseEvent.CLICK, closeWebView);
function closeWebView(e:MouseEvent):void
{
webView.stage = null;
webView.dispose();
}
I am trying to trouble shoot a css issue that is appearing only in iphone browsers. I simply need to detect if the user is using an iphone, and if so, render a modified version of the div that is being affected.
I am happy to just call this modified version of the css div in the header as it will save having a second style sheet.
You used to be able to do it between browsers. It was especially good when rendering a IE6 fix.
Thanks for your help in advanced.
James
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
// do something
}