This is a migrated thread and some comments may be shown as answers.

Touch problem with Android and kendoWindow

4 Answers 58 Views
Window
This is a migrated thread and some comments may be shown as answers.
Casey
Top achievements
Rank 1
Casey asked on 12 Aug 2012, 03:12 PM
I have a couple modal windows, one has a grid with a list of grouped items and when a row is clicked another modal window appears overtop as a confirmation window with a cancel and continue button.  These work fine in IE, Firefox, and Chrome on the desktop but when opened from the Android browser or Chrome for Android there is a problem.  If I click on a row in the first window where a button will appear in the second "confirmation" window it clicks that button as if it was already there.  This causes the confirmation window to appear and then close as if I clicked a button.  I have attached a file that has a basic demo of the problem. Has anyone else seen such behavior and is there a fix?  I'm thinking that since it's working fine in all desktop browsers it must be touch related.

Thanks,
Casey

4 Answers, 1 is accepted

Sort by
0
Casey
Top achievements
Rank 1
answered on 12 Aug 2012, 03:43 PM
I threw together a jsfiddle to demonstrate the problem.  I don't have an IOS device here at the moment to see if it happens on it like it does Android.

http://jsfiddle.net/thesnoman/LxznN/3/embedded/result/
0
Casey
Top achievements
Rank 1
answered on 12 Aug 2012, 04:49 PM
I thought I would post an update.  Tested this on Android 2.3.6 and 4.0.3 and the behavior is consistent.  If I enable animation for the windows it no longer happens so I believe this is a sort of timing issue with touch events on Android.  At this point I believe this is a bug in the Kendo Window. 
 
The problem for me is I cannot have animations for modal windows because if there is more than one modal window open at the same time and you try to close both the windows do close but the modal cover can sometimes remain.  I read somewhere that this is a known issue.  
0
Casey
Top achievements
Rank 1
answered on 12 Aug 2012, 04:59 PM
I just found a work around. I changed the grid's change event as follows:

ORIGINAL:
change: function() {
    ShowConfirmWindow();
}

TO:
change: function() {
    window.setTimeout(ShowConfirmWindow, 25); 
}

Just adding a 25ms delay seemed to fix the problem.  So if anyone else runs into this you can give this a try.
0
Casey
Top achievements
Rank 1
answered on 13 Aug 2012, 12:27 AM
I thought I would add one last thing for javascript newbies like me.  If you're using window.setTimeout and you're calling a function with parameters you must use the following format:

change: function() {
    window.setTimeout(function() { MyFunction(value1, value2, etc) }, 500);
}
 
MyFunction (input1, input2, input3) {
 
};

After further testing I ended up having to add more delay to prevent the problem that started this thread.
Tags
Window
Asked by
Casey
Top achievements
Rank 1
Answers by
Casey
Top achievements
Rank 1
Share this question
or