Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext JS Premium Member
    Join Date
    Aug 2011
    Posts
    10
    Vote Rating
    1
    dlamee is on a distinguished road

      0  

    Post stopEvent fails to prevent blur when custom trigger field is invalid.

    stopEvent fails to prevent blur when custom trigger field is invalid.


    REQUIRED INFORMATION

    Ext version tested:
    • Ext 4.1.1 rev RC2
    • Ext 4.1
    • Ext 4
    Browser versions tested against:
    • Chrome 19
    • IE 9
    • FF 13 (Firebug 1.9.2b2 installed)
    • Safari 5.1.7
    DOCTYPE tested against:
    • HTML 5
    Description:
    • We have a custom trigger control that peforms validation via asynchronous Ajax request on blur. If the field is valid, the focus changes to the new field. If the field is invalid, however, we do not want the focus to change.
    • When tabbing in FF, the focus moves to the next field, ignoring the stopEvent call.
    Steps to reproduce the problem:
    • Type any value in the Trigger field and press tab.
    The result that was expected:
    • The focus should stay in the Trigger field.
    The result that occurs instead:
    • The focus moves to the next field.
    • Again, this is a Firefox-ONLY issue.
    Test Case:
    Code:
    Ext.require([        
            'Ext.form.*',
            'Ext.button.Button',
            'Ext.Ajax'
    ]);
        
    Ext.define('Test.CustomTrigger', {
            extend: 'Ext.form.field.Trigger',
            alias: 'widget.customtrigger',
            
            initComponent : function() {
                var me = this;
        
                Ext.apply(me, {
                    validator: me.onValidate,
                    enableKeyEvents: true
                });
                
                me.callParent();
            },
            
            checkTab: function(me, e) {
                if (!this.ignoreMonitorTab && e.getKey() == e.TAB) {
                    if (!me.isValid()) {
                        e.stopEvent();
                        return;
                    }
                    me.triggerBlur();
                }
            },
            
            validateBlur: function(e) {
                var me = this,
                    value = me.getValue(),
                    valid = true;
                
                if (!me.isValid()) {
                    valid = false;
                    console.log('field is invalid');
                    me.focus();
                }
                return valid;
            },
            
            onValidate: function(value) {
                var responseData;
                
                Ext.Ajax.request({
                        url: 'data.json',
                        async: false,
                        success: function(response){
                            responseData =  Ext.decode(response.responseText);
                        }
                    });
                
                if (responseData.valid === true) {
                    return true;
                } else {
                    return 'Invalid value';
                }
            }
        });
        
        Ext.onReady(function() {
            var required = '<span style="color:red;font-weight:bold" data-qtip="Required">*</span>';
            
            var form = Ext.widget({
                xtype: 'form',
                layout: 'form',
                collapsible: true,
                id: 'simpleForm',
                url: 'save-form.php',
                frame: true,
                title: 'Simple Form',
                bodyPadding: '5 5 0',
                width: 500,
                fieldDefaults: {
                    msgTarget: 'side',
                    labelWidth: 75,
                    validateOnBlur: true
                },
                defaultType: 'textfield',
                items: [{
                    fieldLabel: 'First Name',
                    afterLabelTextTpl: required,
                    name: 'first',
                    allowBlank:false
                },{
                    fieldLabel: 'Last Name',
                    afterLabelTextTpl: required,
                    name: 'last'
                },{
                    fieldLabel: 'Company',
                    name: 'company'
                }, {
                    fieldLabel: 'Email',
                    afterLabelTextTpl: required,
                    name: 'email',
                    vtype:'email'
                }, {
                    fieldLabel: 'Trigger',
                    name: 'trigger',
                    xtype: 'customtrigger',
                    afterLabelTextTpl: required,
                    allowBlank: false,
                    validateOnBlur: false,
                    validateOnChange: false
                }, {
                    fieldLabel: 'Age',
                    name: 'age',
                    xtype: 'numberfield',
                    minValue: 0,
                    maxValue: 100
                }, {
                    xtype: 'timefield',
                    fieldLabel: 'Time',
                    name: 'time',
                    minValue: '8:00am',
                    maxValue: '6:00pm'
                }],
    
    
                buttons: [{
                    text: 'Save'
                },{
                    text: 'Cancel'
                }]
            });
    
    
            form.render(document.body);
        });
    Content of Ajax response:

    Code:
    {
         "valid": false
    }


    HELPFUL INFORMATION
    Operating System:
    • Win7 Enterprise
    Last edited by dlamee; 25 Jun 2012 at 5:57 AM. Reason: Made a little more clear this is a Firefox only issue.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,521
    Vote Rating
    814
    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


    This works on my FF13 for Mac. I typed 'text' in the Trigger field and tabbed and it kept focus on the Trigger field and marked it as invalid.
    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
    Ext JS Premium Member
    Join Date
    Sep 2011
    Posts
    25
    Vote Rating
    0
    austinrh is on a distinguished road

      0  

    Default


    Just tested on Firefox for Windows and this IS an issue.

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,631
    Vote Rating
    581
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    I can reproduce this on Windows, but without researching I'm not really sure if there's a great deal we can do with it, will need to look into it further.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,631
    Vote Rating
    581
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Yeah, looks like it's a FF bug, it seems as though it will fire the focus regardless:

    Code:
    function createField(id) {
        var field = document.createElement('input');
        field.type = 'text';
        field.id = id;
        field.name = name;
        document.body.appendChild(field);
        return field;
    }
    
    document.addEventListener('DOMContentLoaded', function(){
        
        var f1 = createField('f1'),
            f2 = createField('f2');
        
        f1.addEventListener('keydown', function(e){
            if (e.keyCode === 9) {
                var xhr = new XMLHttpRequest();
                xhr.open('GET', 'data.json', false);
                xhr.send(null);
                if (xhr.responseText == 'fail') {
                    e.preventDefault();
                }
                xhr = null;
            }
        }, false);
            
    });
    There's an existing issue: https://bugzilla.mozilla.org/show_bug.cgi?id=489375

    I'll bump it with my test case.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  6. #6
    Ext JS Premium Member
    Join Date
    Aug 2011
    Posts
    10
    Vote Rating
    1
    dlamee is on a distinguished road

      0  

    Default


    Thank you!