1. #1
    Sencha User
    Join Date
    Aug 2007
    Posts
    1
    Vote Rating
    0
    Iskander is on a distinguished road

      0  

    Default 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.

    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>
    To duplicate, click on the Choose File button, select a photo, tap Use, and then tap the web page gain.

    I have not looked too far into this, but wondered if anyone else has run into this.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,798
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    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
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User AkashSaikia's Avatar
    Join Date
    Oct 2011
    Location
    Mumbai, India
    Posts
    33
    Answers
    1
    Vote Rating
    0
    AkashSaikia is on a distinguished road

      0  

    Default 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.

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    16
    Vote Rating
    0
    Ethorsen is on a distinguished road

      0  

    Default


    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)

  5. #5
    Sencha User
    Join Date
    Oct 2012
    Posts
    16
    Vote Rating
    0
    Ethorsen is on a distinguished road

      0  

    Default


    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!

  6. #6
    Sencha User
    Join Date
    Aug 2012
    Location
    Portugal
    Posts
    2
    Vote Rating
    0
    aponte is on a distinguished road

      0  

    Default 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.

  7. #7
    Touch Premium Member
    Join Date
    May 2011
    Posts
    1
    Vote Rating
    0
    diaz_rafael@yahoo.com is on a distinguished road

      0  

    Default Thanks

    Thanks


    Thanks Ethorsen,

    you made my day !

    Schöne Grüsse

  8. #8
    Touch Premium Member Philip Murphy's Avatar
    Join Date
    Oct 2011
    Location
    Dublin, Ireland
    Posts
    27
    Vote Rating
    1
    Philip Murphy is on a distinguished road

      0  

    Default Amazing

    Amazing


    You've saved my bacon. This one was awful as I was originally trying to use an iFrame to isolate the input field from the ST event system. However, this led to its own set of issues (not advisable to take this route - explanation below).

    Why not to use an iFrame to try to solve this problem:-

    If you have the input field in a form which is part of a ST XTEMPLATE, and the form is modified as part of the upload and if you have to update the template again (e.g. navigating to a sub-view and back again during the upload), the form changes will be lost. If you try to remove and re-attach the iframe to the DOM, weird things can happen. The iframe may reload, and the browser probably doesn't like to be detached from the DOM during the upload. Anyway in short, it is much simpler to just fix the issue using the fix as outlined by Ethorsen (many thanks for posting solution).

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi