[CLOSED] Custom control extending DropDownField IE/Firefox

Page 2 of 2 FirstFirst 12
  1. #11
    Hello Edgar!

    Sorry for the pointless "pointers" I provided. But the version of PickerTable.aspx you just posted no longer throws any load error!

    The problem is that the example had so many settings and components that I was not even sure what the expected error was. I have, from the last example you provided, tried to simplify it even more. Can you confirm whether the error is still reproducible or not? Maybe I'm still not right on the problem.

    Here is the simplified version of the PickerTable.aspx:

    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <div>
                <ext:ResourceManager runat="server" />
                <ext:Viewport runat="server">
                    <Items>
                        <ext:Panel
                            runat="server"
                            ID="ctn1"
                            Width="700"
                            Height="500"
                            Html="Test content here" >
                        </ext:Panel>
                    </Items>
                </ext:Viewport>
            </div>
        </form>
    </body>
    </html>
    And just to be sure, here's the Default.aspx file which references to it:

    <%@ Page Language="C#" %>
    
    <%@ Register TagPrefix="pick" Namespace="<must_match_your_project_PickerTable_Class>" Assembly="<must_match_your_project_assembly_name" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <ext:ResourceManager runat="server" />
            <pick:PickerField ID="test" runat="server" />
        </div>
        </form>
    </body>
    </html>
    The PickerTable class is still the same as you originally provided. I'm sure that it could be simplified much more and still reproduce the issue.

    Okay, the two aspx files above work for me and I reproduce the following issue here on Internet Explorer:
    - Load Default.aspx
    - Click the field's picker button
    - A window will appear
    - Click anywhere inside the window
    x The window is dismissed (it should not at all)

    This is what I could understand as being the issue at this point. If that is the issue, there's no reason for all the other controls and stuff inside the example. And probably a considerable amount of code on the PickerField class is also not necessary to reproduce this behavior.

    So if you confirm this as being still the issue, we'll proceed to try and clean up the class, until we leave only essential code to reproduce the issue.

    If that's not the issue, well, I could leave the window open after an arbitrary amount of time, it does not go away by itself (using IE11 here). The situations where it is dimissed are:
    - click outside the window (ok)
    - switch to another application (ok in my opinion too)
    - click into the panel's body (the text written there, for example)

    An interesting behavior I had here is:
    - click the trigger
    - click the window's title bar
    > the window will flash
    > then I believe, from this point it works correctly, if I click in the window, it does not close, but closes if I either click outside the window(picker) or click the close button.

    Let's try to reduce this haystack so we can find the needle, yes? :)
  2. #12
    Quote Originally Posted by fabricio.murta View Post
    The problem is that the example had so many settings and components that I was not even sure what the expected error was. I have, from the last example you provided, tried to simplify it even more. Can you confirm whether the error is still reproducible or not? Maybe I'm still not right on the problem.
    Well, I did mention the error twice.

    Quote Originally Posted by Edgar View Post
    The picker shows a window. In IE it disappears after a couple of seconds.
    Quote Originally Posted by Edgar View Post
    The window does appear in IE, but disappears after 3 to 5 seconds. This doesn't happen in Chrome/Firefox.
    And yes, it still happens with the simplified code. Just to make sure I'm clear - the window disappears without any action from me. I don't click the mouse, nor do I use the keyboard.

    Thank you, Fabrício!
  3. #13
    Hello, I can't get the window to disappear by itself on IE11 (after 3 to 10 seconds at least, the window never disappears!). version 11.0.9600.18450. Update versions: 11.0.35.

    But if I click the window's body, it gets dismissed. Any chance there's an IE extension on your side who's causing the window to be dismissed?

    EDIT: ...to be dismissed after a few seconds, with no clicks other than the one to display the dropdown panel
    Last edited by fabricio.murta; Sep 30, 2016 at 2:45 AM.
  4. #14
    Same version of IE. No extensions, no plugins - pure vanilla.
  5. #15
    Hello again Edgar!

    I have here that the cause of the problem is due to the iframe. Probably if instead of an iframe you loaded just a component instead of a whole page, you wouldn't suffer this issue.

    If you are curious about this possibility, here's one example using loader's component: Loader - Component - Direct Method

    Besides, I believe that this forum thread has a good sample that can be applied to overcome the iframe "click lose focus" issue: Is there some workaround for the IFrame focus problem?.

    The problem lies on me not being able to reproduce the "automatic dismiss" of the dropdown in IE like you described.
    Fabrício Murta
    Developer & Support Expert
  6. #16
    Okay, the two aspx files above work for me and I reproduce the following issue here on Internet Explorer:
    - Load Default.aspx
    - Click the field's picker button
    - A window will appear
    - Click anywhere inside the window
    x The window is dismissed (it should not at all)

    This is what I could understand as being the issue at this point. If that is the issue, there's no reason for all the other controls and stuff inside the example. And probably a considerable amount of code on the PickerField class is also not necessary to reproduce this behavior.

    So if you confirm this as being still the issue, we'll proceed to try and clean up the class, until we leave only essential code to reproduce the issue.
    OK, let's focus on this issue.
  7. #17
    Hello Edgar!

    What I can suggest you for now is disabling collapse on focus out. Again, this issue is because an Iframe is mixed up in the dropdown, then when we click the iframe, it can follow up the click event to the highest DOM level of the inner page and it won't find the dropdown there in the click path. Probably it should check at some point against document.parent while checking focus hierarchy, something that is not supported at the moment.

    So, as you have a 'close' button anyway, I believe it wouldn't be a problem. The override below could also be worked out to check whether the focus out event has came from the iframe and make it collapse if not.

    <script type="text/javascript">
        Ext.define('Ext.form.field.Picker', {
            override: 'Ext.form.field.Picker',
            onFocusLeave: function (e) {
                if (this.xtype != "netdropdown") {
                    this.callParent([e]);
                } else {
                    this.callSuper([e]);
                }
            }
        });
    </script>
    You would add this piece of code to the page containing the custom control, the Default.aspx page.

    Hope this helps for now! I've forwarded this message to our colleagues to see whether they have a second (better) opinion and suggestion on this.
    Fabrício Murta
    Developer & Support Expert
  8. #18
    Hello,

    Yes, I am afraid that with this scenario preventing a DropDownField from being collapsed is the only solution we can provide.

    As for the "auto collapsing" issue I could not reproduce it as well. I believe there is something that triggers collapsing besides just staring at the DropDownField:)
    Last edited by Daniil; Oct 05, 2016 at 7:51 PM.
  9. #19
    Hello Edgar!

    Been some time already since we last heard from you regarding this topic. Do you still need assistance here?
    Fabrício Murta
    Developer & Support Expert
  10. #20
    Hi Fabrício,

    Please mark this thread as closed. Thank you for your assistance!
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 6
    Last Post: Dec 24, 2014, 9:37 AM
  2. [CLOSED] Extending Ext.net Control / Creating Custom Control
    By ljankowski in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 01, 2014, 6:52 PM
  3. [CLOSED] Creating a control by extending the ext:TextField control
    By Shanth in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Sep 12, 2011, 2:58 PM
  4. [CLOSED] Possible to Extending Custom Search Combo Box
    By rbarr in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 01, 2011, 1:39 PM
  5. Extending Ext.Net.TextField Control
    By David Pelaez in forum 1.x Help
    Replies: 1
    Last Post: Dec 22, 2010, 10:43 AM

Tags for this Thread

Posting Permissions