PDA

View Full Version : [CLOSED] [2.2+ Bug] Current Build click on ImageButton causes javascript exception



michaeld
Jun 02, 2013, 2:24 AM
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>

geoffrey.mcgill
Jun 02, 2013, 5:54 AM
Hello,

I do not see the 'me' variable in the code sample you provided.

Baidaly
Jun 02, 2013, 9:42 AM
Hello!

Couldn't reproduce. Have tried our examples page: http://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?

michaeld
Jun 03, 2013, 3:33 AM
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

Baidaly
Jun 03, 2013, 3:42 AM
Can you say what version of IE do you use?

Daniil
Jun 03, 2013, 5:35 AM
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!