Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
310
delete key in WebMaskEdit doesn't work right
posted

When I press the Delete key inside a WebMaskEdit, the cursor moves to the right.  Is there a way to make the delete key stay in place, and delete to the right, like it does in most Word processing controls?

 

  • 24497
    posted

    Hi,

    That is not supported as a built-in feature. If application expects that after delete key caret should keep its original place, then it should implement that behavior. In example below, the ClientSideEvent.KeyDown is processed, and after delete key caret is returned to its original place.

    var deleteEdit = null;
    var deleteCaret = 0;
    function txtCode_KeyDown(oEdit, keyCode, oEvent)
    {
     
    if(keyCode == 46 && oEdit.getSelection() < oEdit.getInputMask().length)
      {
        deleteEdit = oEdit;
        deleteCaret = oEdit.getSelection();
        window.setTimeout(
    'deleteEdit.select(deleteCaret)', 1);
      }
    }