0 Replies Latest reply on Sep 20, 2010 3:11 AM by Julienb54

    Prevent ctrl+v in a spark textarea

    Julienb54

      Hi everybody

       

      I  want to prevent the ctrl+v in a spark textarea. I tried to add a  keyDown event on the textarea and when it is called, I use the method  preventDefault() to stop it. But it doesn't work because the event is  not cancelable. Why ? Is it possible to do that or not ?

       

      The code to prevent the event :

       

      if(ev.ctrlKey == true && ev.keyCode == 86) {
           if(ev.cancelable) {
                ev.preventDefault();
           }


           ev.stopPropagation();
      }

       

      Thanks in advance