Results 1 to 4 of 4

Thread: Possible bug click event firing twice IE 11/10?

  1. #1
    Sencha User
    Join Date
    Oct 2014
    Posts
    7

    Default Possible bug click event firing twice IE 11/10?

    Hey guys is it possible that there is a bug with firing the click event in IE 11 and 10? Because I was having troubles with the ViewController because was running the click event twice, I modified the View to test it easier.

    Code:
    Ext.define('Form.menu.view.Menu', {
        extend: 'Ext.form.FieldSet',
        xtype: 'menu-view',
        items:[
          {
            xtype: 'button',
            width:'220px',
            fontWeight: 'bold',
            itemId: 'per',
            text: 'Nouveau client',
            margin:'0 0 0 20',
            bodyPadding: 10, 
            listeners:{
                afterrender: function () {
                    console.log("rendered");        
        },     
               click: function () {
                    console.log("click");            
        }, 
            }
        },
        ]
    });
    This is what happens. First "rendered" appears. After I click once, I get two "click" in the console.
    Sin ttulo.png

    UPDATE: I added onReady in the class to see if the View isn't created twice or something like this. It appears only once.

    Code:
    Ext.onReady(
        function() {
            console.log('onReady');        
        }
    );
    I also tested the next code in fiddle and it works properly so I guess is not a bug but some mistake of mine. I don't want to create the View like that though, I prefer to just define it and ask for it when I need it.

    Code:
    Ext.create('Ext.form.FieldSet', {   
        renderTo: Ext.getBody(),
        items:[    
        {
            xtype: 'button',
            width:'220px',
            fontWeight: 'bold',
            itemId: 'per',
            text: 'Nouveau client',
            margin:'0 0 0 20',
            bodyPadding: 10, 
            //handler: 'onFormButton' 
            listeners:{
                afterrender: function () {
                    console.log("rendered");
                },         
                click: function () {
                    console.log("click");            
                }, 
            }
        },
        ]
    });
    I must be doing something wrong, I can't imagine everyone has the same bug in IE. Can anyone help please?

    Thanks!

  2. #2
    Sencha User
    Join Date
    Oct 2014
    Posts
    7

    Default

    The bug was caused by copying in the app's overrides folder the same content as it is in the folder ext/overrides. Removing the app's overrides content fixed the bug

  3. #3
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    Just to clarify - not a framework bug we need to look into, correct?

  4. #4
    Sencha User
    Join Date
    Oct 2014
    Posts
    7

    Default

    Correct. Was an error created by us.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •