Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eguitarz committed Sep 8, 2016
1 parent bc77319 commit bf0dcc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,13 @@ class Editor {
// For IE < 9
newlineEvent = document.createEvent('Event');
newlineEvent.initEvent('newline', true, true);
// For IE 11
newlineEvent.preventDefault = function() {
this._defaultPrevented = true;
};
}
this.runCallbacks(CALLBACK_QUEUES.WILL_HANDLE_NEWLINE, [newlineEvent]);
if (newlineEvent.defaultPrevented) { return; }
if (newlineEvent.defaultPrevented || newlineEvent._defaultPrevented) { return; }

cursorSection = postEditor.splitSection(range.head)[1];
postEditor.setRange(cursorSection.headPosition());
Expand Down

0 comments on commit bf0dcc7

Please sign in to comment.