-
26 Sep 2012 2:51 PM #1
Unanswered: iOS 6 with Sencha Touch 1.1 file upload
Unanswered: iOS 6 with Sencha Touch 1.1 file upload
After choosing a file via a "Choose File" button (input type="file") on an iOS6 iPhone, I encounter a strange behavior almost everytime. The "Take Photo...Choose Existing" dialog reapears on my first tap after the original choosing.
To duplicate, click on the Choose File button, select a photo, tap Use, and then tap the web page gain.Code:<html> <head> <title>image upload test</title> <!--iOS 6 and Sench-Touch-1.1 cause a toast window to reappear after choosing a file and tapping anywhere --> <script type="text/javascript" src="/_m/assets/libraries/Sencha-Touch-1.1/sencha-touch-debug.js"></script> <meta name="viewport" content="maximum-scale=0.6667; width=480" /> </head> <body> <form action="ImgUploadTestPost.aspx" method="post" enctype="multipart/form-data" name="imgPost"> <input type="file" name="upload1" /> </form> </body> </html>
I have not looked too far into this, but wondered if anyone else has run into this.
-
28 Sep 2012 6:06 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
With your code, the only Sencha Touch thing there is you include the JS file but there is no javascript
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
15 Oct 2012 7:52 AM #3
File input control in sencha 1 for IOS6 issue
File input control in sencha 1 for IOS6 issue
Even i am facing the same issue.
There is no need of special javascript code or something.
Just put a file control in any specific sencha container or panel. Tap on the Html File control, the Camera Roll menu opens some where else where we tapped previously.
It even gets opened for the second time when you tap some where else.
-
22 Oct 2012 12:05 PM #4
Anyone found a solution for this one? We'll probably have to dig ourselves in the sencha 1.1 code.
This is doing the same here. You click on the file input and after selecting a pic (or cancelling), no matter where you click it will open the file dialog again.
In addition to this, you cant have the file dialog opened by triggering the click on the html file input (which I know works perfectly in iOS6 for doing it in jQuery mobile)
-
25 Oct 2012 8:29 AM #5
So for those of you stuck in sencha 1.1. The problem is that when you click on a file input in ios6, 2 'touchstart' events are being triggered. (dunno why)
Ugly hack details:
In Sencha, find the Ext.gesture.Manager object.
After: clickMoveThreshold: 5,
add: preventNextTouchStart: false,
In the onTouchStart function of that same object.
After:
if (this.isFrozen) {
return;
}
Add:
if (Ext.is.iOS && target.type === 'file') {
if (this.preventNextTouchStart) {
this.preventNextTouchStart = false;
return;
} else {
this.preventNextTouchStart = true;
}
} else {
this.preventNextTouchStart = false;
}
Enjoy!
-
20 Dec 2012 8:09 AM #6
Same problem on Sencha Touch 2.0
Same problem on Sencha Touch 2.0
I´m having the same problem in Sencha Touch 2.0
When I select a photo from my ipad or iphone with ios 6.0 I can see the fake url but when a submit the foto I was asked to select the photo again and the post doesn't send the photo to the server.
The same code works on android.
-
17 Apr 2013 11:00 PM #7
Thanks


Reply With Quote