Results 1 to 6 of 6

Thread: [FireFox 53 with ExtJs 6.2, 6.5] FF focus problems on floating iframes

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,199

    Default [FireFox 53 with ExtJs 6.2, 6.5] FF focus problems on floating iframes

    In FireFox 53 we encounter some focus problems with floating iframes.

    See fiddle where I have created an html - iframe - picker:

    https://fiddle.sencha.com/#view/editor&fiddle/216l

    When clicking the tricker button, the picker shows up fine in Chrome but in FF the picker immediately collapses because onFocusLeave is hit in the Ext.grid.CellEditor plugin when the iframe document gets the focus.

    This is probably caused in the class Ext.event.publisher.Focus (I checked Ext6.2.1 version) . There is a piece of code in it, triggered when focusin and focusout events are not supported.

    See snippet:
    Code:
     if (!Ext.supports.FocusinFocusoutEvents) {
            // When focusin/focusout are not available we capture focus event instead, 
            // and fire both focusenter *and* focusleave in the focus handler. 
            this.override({
                handledDomEvents: ['focus', 'blur'],
                
                publishDelegatedDomEvent: function(e) {
                    var me = this,
                        targetIsElement;
                    
                    me.callSuper([e]);
     
                    // We need to know if event target was an element or (window || document) 
                    targetIsElement = e.target !== window && e.target !== document;  // <--- will get false when iFrame is hit
     
                    // There might be an upcoming focus event, but if none happens 
                    // within a minimal timeout, then we treat this as a focus of the body 
                    if (e.type === 'blur') {
                        if (!targetIsElement) {
                            // Apparently when focus goes outside of the document, Firefox 
                            // will fire blur on the currently focused element, then on the document, 
                            // then on the window. Interestingly enough, both follow-up blur events 
                            // will have explicitOriginalTarget pointing at the previously focused 
                            // element; when that happens we can be reasonably sure that focus 
                            // indeed goes out the window. 
                            if (e.explicitOriginalTarget === Focus.previousActiveElement) {
                                // But we want that to fire only once, so process window blur 
                                // which happens last. 
                                if (e.target === window) {
                                    clearTimeout(focusTimeout);
                                    focusTimeout = 0;
                                    me.processFocusIn(e, Focus.previousActiveElement, document.body);
                                    Focus.previousActiveElement = null;
                                }
                            }
                        }
    targetIsElement will get false when the iframe is hit.

    Code:
      targetIsElement = e.target !== window && e.target !== document;
    Then me.processFocusIn(e, e.target, document.body) is called instead of me.processFocusIn(e, Focus.previousActiveElement, document.body);
    causing the picker to collapse (I guess).

    While this part of code is hard to override, could you filter out the floating iFrames in this handler?

    Also in IE11 we experience some problems. On the first trigger click the picker immediately collapses - the next clicks are fine.

  2. #2

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    914

    Default

    Html editor can not be used as cell editor. That's what the documentation states:
    Note: The Ext.form.field.HtmlEditor field is not a supported editor field type.
    editor config

  4. #4
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,199

    Default

    That is not the case. Ext.form.field.Picker is used as editor. The Ext.form.field.HtmlEditor is its floating picker. Nothing mentioned about that.

    Works fine in Chrome!

  5. #5
    Sencha Premium User
    Join Date
    Oct 2013
    Location
    Kharkiv, Ukraine
    Posts
    32

    Default

    The issue is still relevant for FF55 with Ext 6.5.1
    Any updates?

  6. #6
    Sencha Premium User
    Join Date
    Oct 2013
    Location
    Kharkiv, Ukraine
    Posts
    32

    Default

    BUMP: still not fixed in 6.6.0

Similar Threads

  1. Replies: 2
    Last Post: 2 Oct 2014, 6:21 AM
  2. [Solved 2.0.2] Tabpanel & iframes problem, Firefox Only
    By leonardlk in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 18 May 2008, 11:27 PM
  3. iframes and cached resources in firefox
    By sean in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 19 Mar 2007, 8:41 PM

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
  •