mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
fix: weird glitch in codeblock on tab key press
This commit is contained in:
@@ -171,12 +171,7 @@ var registerHandlers = function (api, editor) {
|
||||
moveCaretTo(node, characterRange.start, endIndex);
|
||||
} else {
|
||||
// TODO: handle line deindent
|
||||
node.textContent = insertAt(text, TAB, characterRange.start);
|
||||
moveCaretTo(
|
||||
node,
|
||||
characterRange.start + TAB.length,
|
||||
characterRange.end + TAB.length
|
||||
);
|
||||
editor.insertContent(TAB);
|
||||
}
|
||||
} else {
|
||||
editor.insertContent(TAB);
|
||||
|
||||
Reference in New Issue
Block a user