1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    13
    Vote Rating
    0
    tim.o is on a distinguished road

      0  

    Default Unanswered: no input in textarea possible

    Unanswered: no input in textarea possible


    I created a mobile portal, which imported Sencha Touch applications in an iframe.


    A sample application has only one textarea field (Sencha Touch 2.2.1). I can tap on the textarea, the keyboard opens and focuses on the field correctly. But the input of the keyboard will not appear in the textarea.


    Overriding the method "doKeyUp" have shown that the keycodes arrive correctly, but for some reason the letters do not appear in the input-field.


    If I use Sencha Touch 2.1.1 everything works correctly, perhaps changes were introduced here?
    Maybe there is a walkaround, which enables this behavior again?



    I am grateful for any help


    best regards
    Tim

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    411
    Answers
    5
    Vote Rating
    17
    jweber will become famous soon enough

      0  

    Default


    Can you post code that reproduces the problem? I've had a similar issue on iPhones, when I have an iframe containing text fields. Usually I can type into them at first, but after I scroll the iframe, typing no longer works. But in my case, the Sencha framework is loaded in the parent window, not the iframe itself. So it might be a different issue.

  3. #3
    Sencha User
    Join Date
    Aug 2010
    Posts
    13
    Vote Rating
    0
    tim.o is on a distinguished road

      0  

    Default


    Thanks for your answer!


    I have this trouble only in iOS, too. It works in Android with the Chrome browser.


    My code looks like this:
    1) An iFrame component that I can create or destroy:

    The url attribute is filled dynamically.

    Code:
    Ext.define('Ext.ux.IframeComponent', {
        extend: 'Ext.Component',
        
        xtype: 'iframecmp',
        
        config: {
            
            itemId: 'iframecmp',
            
            url: null,
            baseCls: Ext.baseCSSPrefix + 'iframe',
            width: '100%',
            height: '100%',
            style: 'background: #ffffff;',
            
            left: '0px',
            right: '0px',
            top: '0px',
            bottom: '0px'
        },
        
        initialize: function(){
            this.callParent(arguments);
            
            this.iframe = this.element.createChild({
                tag: 'iframe',
                src: this.getUrl(),
                style: 'width: 100%; height: 100%; border: 0px; background: #ffffff; position: absolute; top: 0; bottom: 0; left: 0; right: 0;'
            });
            
            this.relayEvents(this.iframe, '*');
            
        }
        
    });
    2.) A sample application, as a Sencha Touch project:

    a) View:
    Code:
    Ext.define('SenchaFormTest.view.Main', {
        extend: 'Ext.Container',
        xtype: 'main',
        requires: [
        ],
        config: {
    
    
            layout: 'vbox',
        
            items: [
                {
                    xtype: 'textareafield'
                }
            ]
        }
    });
    b) Controller method:

    the controller currently contains this function as a poor workaround. First, it is checked whether it is a tablet and iOs. If this is the case, the keyup event is intercepted. The keyCode of the event shows which button was pressed to concatenate it to the value of the textarea.

    Code:
    if(Ext.os.is.iOS && Ext.os.deviceType == 'Tablet'){
                this.getWorkitemnotice().on('keyup', function(me, e, eOpts ){
                    
                    
                    var temp = me.getValue();
                
                    var isShiftKey = e.event.shiftKey;
                    var characterCode = e.event.keyCode;
                    
                    if (characterCode != 27
                        && characterCode != 8
                        && characterCode != 9
                        && characterCode != 20
                        && characterCode != 16
                        && characterCode != 17
                        && characterCode != 91
                        && characterCode != 13
                        && characterCode != 92
                        && characterCode != 18) {
                       
                       
                           var characterMap = [];
                           characterMap[16] = "?";
                           characterMap[32] = " ";
                           characterMap[49] = "!";
                           characterMap[186] = "ü";
                        characterMap[188] = ",";
                        characterMap[190] = ".";
                        
                        
                        
                        var character = "";
                        if (isShiftKey) {
                            if (characterCode >= 65 && characterCode <= 90) {
                                character = String.fromCharCode(characterCode);
                            } else {
                                //character = characterMap[characterCode];
                                //console.log(characterCode);
                                
                                if(characterCode == 49){
                                    character = characterMap[characterCode];
                                }else if(characterMap[characterCode] != undefined){
                                    
                                    character = characterMap[characterCode].toUpperCase();
                                }
                                
                            }
                        } else {
                            if (characterCode >= 65 && characterCode <= 90) {
                                character = String.fromCharCode(characterCode).toLowerCase();
                            } else {
                                console.log(characterCode);
                                //character = String.fromCharCode(characterCode);
                                character = characterMap[characterCode];
                            }
                        }
                        
                        temp += character;
                       
                       
                       
                    }else if(e.event.keyCode == 8){
                        temp = temp.slice(0, temp.length-1);
                    }
                    
                    me.setValue(temp);
                    
                    
                    
                        
                });
            };
    Best regards
    Tim

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    411
    Answers
    5
    Vote Rating
    17
    jweber will become famous soon enough

      0  

    Default


    Not sure you're having the same issue, but I reported mine here.

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Posts
    411
    Answers
    5
    Vote Rating
    17
    jweber will become famous soon enough

      0  

    Default


    Apparently Sencha doesn't support the use of iframes.

Thread Participants: 1

Tags for this Thread

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