I have noticed that DHTMLx Touch does not fill the screen when run on an iPhone 5 in fullscreen mode. There appears to be some logic in the debug library that renders to the size of the viewport based on the iPhone 1-4 dimensions but there is no logic to detect the iPhone 5.
The code you posted didn’t appear to work on the iPhone 5. I have tweaked the code and attached a working debug copy.
Note there is only one test for iphone5 safari (444) as i’m not sure where the other screen sizes are coming from for the iphone1-4 test.
var iphone = navigator.userAgent.indexOf("iPhone")!=-1;
var iphone5 = (window.screen.height==568);
var ipad = navigator.userAgent.indexOf("iPad")!=-1;
var iphone_safari = iphone && (size == 356 || size == 208 || size == 306 || size == 158 || size == 444);
var fix = function(){
var x = 0; var y=0;
if (iphone){
if (!dhx.ui.orientation){
x = 320;
y = iphone5?(iphone_safari?504:548):(iphone_safari?416:460);
} else {
x = iphone5?568:480;
y = iphone_safari?256:300;
}
thank you for your solution. We’ll add it into the next official release. Attached library is official touchui.js with your fix included. touchui.zip (61.3 KB)
I have had de same problem when i have to implement my app in iphone 5. When I replace the library ,the problem was fixed but a new one appear with the scroll (in a list, for example) . this problem appear in iphone and iphone5.
Before, my list is moved, and kept down at all well , but now the last item of the list appears cut. i move scroll to the bottom of de view and when I arrive to the end and i can see the last item complete and I lift my finger to the screen, the scroll is moved slightly upward and the last item of the list not show completly.
in another view that not is a list, the last elements appear cut like it detected the size of the screen was bigger. with the libray without modify it looks fine.
If i put a catch error the alert is: “error NOT_SUPPORTED_ERR:DOM Exception 9”
$$("segmented").attachEvent("onBeforeTabClick", function (button, id)¨{
try{
$$("id).show()
}catch(err){
alert(err);
}
});
I attached the library, without chart error, that I use in my old app version. I need this library with the changes to iphone5 that appears of this thread.
I have done a demo. this have a menu with 4 buttons. if you click in the link that say: go to chart! appear a alert (“hola”) and a chart view is opened.
if you load www–>codebase–>touchui_original.js ( app open the chart but not looks fine at iphone 5).
my app is done with this version of dhtmlx.
if you load www–>codebase–>touchui_foro_modify.js ( app looks fine at iphone 5 but chart dont show). this is the library that appears on this thread.
we have found an issue. It is caused by 0 value (if the json contained “0”, there was not such a problem).
I have attached the fixed touchui_foro_modify.js - please try it. touchui_foro_modify.zip (60.9 KB)
ohhhh! ok! thanks so much, alexandra. this works fine.
now, I have other issue, with this and the other libraries. When I run the app on ipad device , appears a similar problem that with iphone 5 (that renders to the size of the viewport based on the iPhone 1-4 ). you can try this with the demo. when I debugging in xcode the webViewBounds size is: width =320 height=460. like happened in iphone 5 with the library without modify.
if you run the demo with ipad device…Can you reproduce the bug?
I do not know if it will have to do with the library or code error
I am sorry, Alexandra. To reproduce the problem, do you have to run the app in ipad device (with phonegap). In this case the app don’t looks fine .
I fixed the problem when I remove the following line to the code:
dhx.attachEvent("onReady", dhx.ui.fullScreen);
If you try the above demo,with that line and without that line, on an iPad you will see what I mean. ah! the demo above with the last library attached. with other library i think it also happens.
Some days ago, DHTMLx crashed my iPhone 5. I just trying to connect my iTunes with my iPhone but suddenly the DHTMLx showing 0xe8000015 error code. I don’t know what happens but when I try to reconnect it, it won’t connect anyhow. Does anyone have any idea that why this happens and what’s the solution to it?
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan