jquery - ENTER (how to block, getting bottom row) -


i have div named "block". editable div (contenteditable="true") when i'm focused div, if press enter cursor gets bottom row. want block thing. want remove getting bottom row function when press enter.

is there anyway this?

you can prevent listening keydown event , return false.

// replace '#block' element id  $('#block').on('keydown', function(e){      // e.which returns keycode key pressed      // '13' enter key.     if(e.which == 13)         return false;  }); 

Comments

Popular posts from this blog

gcc - Calling fftR4() in c from assembly -

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

reflection - Prism + Log4Net build error : "Cannot resolve dependency to assembly log4net" -