Jump to content

UniHTMLMemo not firing OnKeyDown


arilotta

Recommended Posts

Arilotta there is a good reason for that, keep in mind that this will create a lot of network traffic as it will fire an ajax request off to the server with every keystroke...if the user types a fast 10 characters...times that with 10 users...;)

I would like to understand the use case of this.

Link to comment
Share on other sites

I need to popup a dialog when the user presses F2 that allows them to insert custom pre-configured text in the component.

Gerhard IV, your point is true, I changed the JS supplied by Sherzod in the following way, passing therefore only the F2 key via Ajax:

function initialize(sender, eOpts)
{
      var me=sender;
    me.getDoc().addEventListener("keydown", function(e){
      if (e.keyCode==113) {
        ajaxRequest(me, 'keydown', ['key='+e.keyCode])
      }
    });
}

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...