We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d51afeb commit 358f295Copy full SHA for 358f295
editor/static/js/editor.js
@@ -1431,7 +1431,7 @@ $(document).ready(function() {
1431
setup: function(ed) {
1432
ed.on('keydown', function(oe) {
1433
// when inside a math environment, pressing the enter key adds a <br> instead of a paragraph break.
1434
- if(oe.key != 'Enter' || oe.shiftKey || oe.ctrlKey || oe.altKey || oe.metaKey || !ed.getBody().classList.contains('in-maths')) {
+ if(oe.key != 'Enter' || oe.shiftKey || oe.ctrlKey || oe.altKey || oe.metaKey || !element.classList.contains('in-maths')) {
1435
return;
1436
}
1437
oe.preventDefault();
0 commit comments