[CLOSED] KeyMap inside Panel not working

  1. #1

    [CLOSED] KeyMap inside Panel not working

    I can't get a KeyMap inside a panel to work. Am I doing something wrong here or is this a beta feature :-)

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Bug1.aspx.cs" Inherits="PagingStoreTest.Bug1" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <form id="form1" runat="server">
       <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Viewport ID="Viewport1" runat="server" Layout="VBoxLayout">
                <ext:VBoxLayoutConfig Align="Stretch" />
                <ext:Panel ID="Panel1" runat="server" Title="Panel1" Flex="1" Height="300">
                        <ext:KeyBinding Alt="true" StopEvent="true">
                                <ext:Key Code="W" />
                                <Event Handler="Ext.Msg.alert('Hello','Hello');" />
    Last edited by Daniil; Apr 06, 2012 at 10:59 AM. Reason: [CLOSED]
  2. #2

    Please see #89:

    For now I can suggest to try the following.

    <ext:KeyMap runat="server" Target="#{Panel1}.getEl()">
        <ext:KeyBinding Alt="true">
                <ext:Key Code="W" />
                <Event Handler="Ext.Msg.alert('Hello','Hello');" />
    But I think it won't work in all browsers, because the Panel getEl returns a "div" element which, by standard, doesn't listen key events.

    It will work if, for example, there is a focused TextField in that Panel. Aslo it will work for GridPanel, because there is an anchor (<a>) HTML element to support cell/row focusing.

    Generally, I would suggest to use KeyMap for elements which listen key events itself. For example:
  3. #3
    I will try to create a external KeyMap as you suggest and set the Target property. Thanks

Similar Threads

  1. [CLOSED] Error when binding KeyMap to not active Panel in TabPanel
    By Fredrik in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 02, 2012, 2:52 PM
  2. Replies: 2
    Last Post: Sep 21, 2010, 12:14 PM
  3. [CLOSED] Tooltip and KeyMap is not working on htmlEditor
    By yobnet in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 25, 2010, 9:20 AM
  4. [CLOSED] KeyMap in Panel not working in mozilla
    By klavsm in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 17, 2010, 11:19 AM
  5. KeyMap not working for whole window
    By dbassett74 in forum 1.x Help
    Replies: 3
    Last Post: May 21, 2009, 2:55 PM

Posting Permissions