[CLOSED] JS Error if KeyMap target doesnt exist

  1. #1

    [CLOSED] JS Error if KeyMap target doesnt exist

    Found In: 4.2.1


    This is pretty straight forward. Just load the page and it crashes. Granted, the target should exist, but it shouldnt crash if it doesnt.
    it should just ignore targets that dont exist.
    thanks,
    /Z


    <%@ Page Language="C#" %>
    
    
    <%@ 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  lang="en" xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Search </title>
    </head>
    <body>
        <form id="Testsetset" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            
            <ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">          
                <Items>  
                    <ext:TextField runat="server" Text="hello" FieldLabel="test" />
                </Items>
            </ext:Viewport>
            <ext:KeyMap ID="KeyMap1" runat="server" Target="FormPanelTest1" >
                <Binding>
                    <ext:KeyBinding Handler="alert('test');">
                        <Keys>
                            <ext:Key Code="ENTER"/>
                        </Keys>
                    </ext:KeyBinding>
                </Binding>
            </ext:KeyMap>
        </form>
    </body>
    </html>
    Last edited by fabricio.murta; Aug 18, 2017 at 10:13 PM. Reason: no feedback from the user in 7+ days
  2. #2
    Hello @Z!

    You already reported this on this thread: KeyMap issue.

    Although not exactly this though, we covered the issue you are talking about in the last response (to date) for that thread. By the way, we're waiting for your feedback from that issue, would you mind? :)
    Fabrício Murta
    Developer & Support Expert
  3. #3
    i havent worked on the KeyMap issue since i ran into so many others...
    Can you respond to my other issues. i have 6 total open issues in forum now.
    Once i get responses to all, i will retest (since i need to switch branches to test)
    /Z
  4. #4
    Hello @Z! Sorry for the delay on the other threads, we're working on them!

    We're looking forward to your feedback on this issue, and hope it has been responded in the above linked thread/post.
    Fabrício Murta
    Developer & Support Expert
  5. #5
    I think this issue is different. Pls review it as a separate issue.
    Thxs
    /Z
  6. #6
    Hello @Z!

    After reviewing the issue I came at the same conclusion. There's nothing in the page that matches FormPanelTest1 so the key mapping naturally breaks as it does not have a valid target to bind to.
    Fabrício Murta
    Developer & Support Expert
  7. #7
    Hello @Z!

    It's been some time since we last posted here and still no feedback from you. Do you still need help with this? I'm afraid the keymap is not going to work without a previously defined, valid target anyway, and I don't personally see how that would be possible. It would require a timer, or event, to continuously probe for the target so that, when it becomes available, it then binds the keypress event handler to the component, something currently not supported on ExtJS nor Ext.NET -- but possible with some programming.

    Well, anyway, by the protocol, if you don't post a follow up here in 7+ days from now, we'll assume you no longer need help with this and will be marking it as closed. Of course, if that's wrong, you will always be able to post here so we can continue the inquiry, even after we mark the thread as closed.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 6
    Last Post: Sep 04, 2012, 12:59 PM
  2. [CLOSED] JS error on SelectBox when typed not exist item
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 09, 2012, 6:24 AM
  3. Replies: 12
    Last Post: May 17, 2011, 7:08 AM
  4. Replies: 1
    Last Post: Feb 22, 2011, 11:25 PM
  5. BorderLayout KeyMap Error
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Dec 17, 2009, 8:18 AM

Posting Permissions