Do you want to request a feature or report a bug?
Bug
What is the current behavior?
If I add an event handler on "keydown" which calls event.preventDefault() if it's the enter key (event.keyCode === 13), a breakline is added to the content (default behavior)
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via fiddle.tinymce.com or similar.
Here is a fiddle to reproduce: http://fiddle.tinymce.com/UAgaab
- If you press Enter, a breakline is added
- Then if you press the up arrow, the caret doesn't move.
- In console, we can see that both events should have been prevented
What is the expected behavior?
If preventDefault is called during keydown of Enter, it shouldn't add a breakline.
Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?
Spotted on 4.9.2 on Chrome and Firefox.
Reproduced on previous versions of TinyMCE until 4.0.22 (previously no event handler was possible)
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
If I add an event handler on "keydown" which calls
event.preventDefault()if it's the enter key (event.keyCode === 13), a breakline is added to the content (default behavior)If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via fiddle.tinymce.com or similar.
Here is a fiddle to reproduce: http://fiddle.tinymce.com/UAgaab
What is the expected behavior?
If
preventDefaultis called during keydown of Enter, it shouldn't add a breakline.Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?
Spotted on 4.9.2 on Chrome and Firefox.
Reproduced on previous versions of TinyMCE until 4.0.22 (previously no event handler was possible)