Skip to content

Commit 5270e89

Browse files
committed
Merge pull request #56 from beyounic/insert-direction
Bug: Insert direction in empty editable should be 'after'
2 parents ea01c25 + 378d514 commit 5270e89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/dispatcher.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ var dispatcher = (function() {
125125
var range = selectionWatcher.getFreshRange();
126126
var cursor = range.forceCursor();
127127

128-
if (cursor.isAtBeginning()) {
129-
notifier('insert', this, 'before', cursor);
130-
} else if(cursor.isAtTextEnd()) {
128+
if (cursor.isAtTextEnd()) {
131129
notifier('insert', this, 'after', cursor);
130+
} else if(cursor.isAtBeginning()) {
131+
notifier('insert', this, 'before', cursor);
132132
} else {
133133
notifier('split', this, cursor.before(), cursor.after(), cursor);
134134
}

0 commit comments

Comments
 (0)