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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...