iPhone 5 Support

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.

Is there support for the iPhone 5?

Yes, there is an issue with fullscreen on iPhone5. We will provide a soliution within a week.

Hi Alexandra,
Any update on this issue? I’d be happy to test any early releases you have.

Hi James,

try to use attached libs instead of originals
libs.zip (169 KB)

Hi Alexandra,

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;

touchui_debug.rar (96.1 KB)

Hi James,

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)

The attached code has regressed and has re-introduced the formatting bug that was addressed in the following post:


I wrote the following in my previous reply:
“Attached library is official touchui.js with your fix included.”

Now I’ve attached the dev version. You can use it or wait for the official version (probably it will be released next month)
libs.zip (185 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.

Can you help me? Thanks!

Hi again!

I replaced the scroll problem adding a blank space under each view. Is not very responsive, but it works.

Now I have a new problem, I have a chart view, and it doesn’t work, so I want to know if there is a stable library with the iphone 5 bug resolved

Thanks so much


please attached demos where we could reproduce problems that you described

Hi again!! :wink:

If i put a catch error the alert is: “error NOT_SUPPORTED_ERR:DOM Exception 9”

$$("segmented").attachEvent("onBeforeTabClick", function (button, id)¨{




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 need youuu, Alexandra!!! :cry:

Thanks so much!

:frowning: There is not an attachment in your latest post…

Please attach the demos where we could reproduce the problem.

Sorry Alexandra!!!

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.

Thanks so much!
www.7z (155 KB)


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! :open_mouth: ok! thanks so much, alexandra. this works fine. :wink:

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 :frowning:

Thanks so much, again.


the problem was fixed. If I remove the following line of code my app look fine at ipad device too. Why??

 dhx.attachEvent("onReady", dhx.ui.fullScreen);


The demo works with the library that I attached in the previous reply. What should be do to reproduce the problem ?

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.

thanks!! :wink:

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?