Results 1 to 7 of 7

Thread: [4.2.x] Strange Focus/Blur - Button-Click-Handler Bug in IE

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527

    Default [4.2.x] Strange Focus/Blur - Button-Click-Handler Bug in IE

    Hi,

    I've got a strange bug in IE for which I don't have an explanation.

    Please open the following fiddle in IE:
    https://fiddle.sencha.com/#fiddle/473

    The problem is with a button handler with clickEvent:'click' (what is the default) that doesn't get called while a grid editor has focus.
    But only if the toolbar is part (bbar for example) of the grid itself. Buttons that are not part of the grid panel work fine.

    I know that blur events are internally delayed a bit (10ms or something like that). But that only would explain if the value isn't correct at the moment the handler is executed. But IMO it cannot explain that the handler isn't executed at all.

    Please take a look at the fiddle, all details are inside.
    Any hints are welcome.

    Regards,
    makana
    Programming today is a race between software engineers striving to build bigger and better ?diot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,451

    Default

    Is this all IE or just particular version(s)?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527

    Default

    Hello Mitchell,

    thanks for your interest!

    We've IE11 on a WIN8.1 x64 machine.

    But it's also the same problem if we change the version emulation in the developer tools to IE8/9/10 - all in standard mode. Lower and quirks is not testet since we do not support them.


    Some time ago I had a similar problem with IE. That was with fields with allowBlank set to false. If the field was focused and nothing was typed then the button handler wasn't executed on first click.
    I changed validateOnBlur to false and it worked.
    I think both problems have something in common. I tried to include an example in the fiddle, but I'm not able to reproduce it at the moment...

    Kind Regards,
    makana
    Programming today is a race between software engineers striving to build bigger and better ?diot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  4. #4
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527

    Default

    Any news regarding this?
    Just want to make sure this problem doesn't move down the forum into oblivion...

    Is there still some information required?

    Regards,
    makana
    Programming today is a race between software engineers striving to build bigger and better ?diot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  5. #5
    Sencha User
    Join Date
    Apr 2011
    Posts
    48

    Default

    I'm also seeing a similar issue with the editable cell plugin. In my example I have a save button on my dialog which is only clickable when the blur event happens. However if I edit a cell in IE and go straight to clicking the button the blur event doesn't happen. But if I click anywhere else in the dialog the blur event does happen, the button becomes active and the store is marked as dirty. Works perfect in Chrome. Doesn't work at all in IE11.

  6. #6
    Sencha User
    Join Date
    Apr 2011
    Posts
    48

    Default

    I came across this blog post which helped me with my issue. Perhaps it can also apply to the original posters' problem? https://ahlearns.wordpress.com/2012/...nd-blur-event/

  7. #7
    Sencha Premium Member
    Join Date
    Sep 2012
    Posts
    6

    Default Figured it out

    IE11 is incompatible with extjs 4.2.1 and below. Find the onMouseDown function in the source of Ext.Button

    Code:
    onMouseDown: function(e) {        
        var me = this;        
    
        if (Ext.isIE) {            
          // In IE the use of unselectable on the button's elements causes the element           
          // to not receive focus, even when it is directly clicked.            
          me.getFocusEl().focus();        
        }
     
        if (!me.disabled && e.button === 0) {            
           Ext.button.Manager.onButtonMousedown(me, e);            
           me.addClsWithUI(me.pressedCls);        
        }    
    }
    
    You see that check for Ext.isIE? In versions 4.2.1 and below Ext.isIE returns false when using IE11 because there is no test for it in the Ext singleton class. When encountered, that hack for IE is what causes blur to fire in the situation you described. The best option is to upgrade to 4.2.2. Otherwise, you can throw your own hack in 4.2.1 that makes Ext.isIE true for IE11, but that might have some very bad unintended consequences.

Posting Permissions

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