[CLOSED] [2.2+ Bug] Current Build click on ImageButton causes javascript exception

  1. #1

    [CLOSED] [2.2+ Bug] Current Build click on ImageButton causes javascript exception

    Click image button causes this exception in ImageButton.js at onMouseDown at me.getFocusEl().focus();
    me is not defined

                    <ext:ImageButton ID="Log" runat="server" ImageUrl="/img/Login.png" Cls="Log" Height="19" Width="122" Margins="0 0 0 1px">
            <Listeners>
                <Click Handler="document.location='/';" />
            </Listeners>
            <ToolTips>
                <ext:ToolTip runat="server" Html="Log-in" />
            </ToolTips>
            </ext:ImageButton>
    Last edited by Daniil; Jun 06, 2013 at 4:33 AM. Reason: [CLOSED]
  2. #2
    Hello,

    I do not see the 'me' variable in the code sample you provided.
    Geoffrey McGill
    Founder
  3. #3
    Hello!

    Couldn't reproduce. Have tried our examples page: https://examples2.ext.net/#/Buttons/Basic/ImageButton/

    And with the following sample:

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head id="head" runat="server">
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        
        <ext:ImageButton ID="Log" runat="server" ImageUrl="/img/Login.png" Cls="Log" Height="19" Width="122" Margins="0 0 0 1px">
            <Listeners>
                <Click Handler="document.location='/';" />
            </Listeners>
            <ToolTips>
                <ext:ToolTip runat="server" Html="Log-in" />
            </ToolTips>
        </ext:ImageButton>
    </body>
    </html>
    Did I miss something?
  4. #4
    Quote Originally Posted by geoffrey.mcgill View Post
    Hello,

    I do not see the 'me' variable in the code sample you provided.
    You'll find the line I'm referring to on line 3835 in
    /extnet/extnet-all-debug-js

        onMouseDown : function (e) {        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();
            }
    It only appears in IE
  5. #5
    Can you say what version of IE do you use?
  6. #6
    Hi,

    I feel it should be reproducible in any IE version according to the "Ext.isIE" condition.

    The issue has been fixed in the SVN trunk. Please update.

    Thank you for the report!

Similar Threads

  1. [CLOSED] Can not build Trunk with .NET35 build configuration
    By jchau in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 24, 2012, 2:20 PM
  2. Replies: 5
    Last Post: Nov 26, 2012, 2:33 PM
  3. [CLOSED] [1.0] ImageButton DirectEvent Click
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 21, 2011, 4:10 PM
  4. [CLOSED] [1.0] JavaScript Exception?
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Mar 14, 2010, 8:44 PM
  5. How to hide/show ImageButton in JavaScript?
    By dbassett74 in forum 1.x Help
    Replies: 2
    Last Post: Jun 16, 2009, 3:47 PM

Posting Permissions