Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/super-editor/src/extensions/tab/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export const TabNode = Node.create({
},

apply(tr, oldDecorationSet, oldState, newState) {
if (!tr.docChanged) return oldDecorationSet;
Comment thread
harbournick marked this conversation as resolved.
const decorations = getTabDecorations(newState, view);
return DecorationSet.create(newState.doc, decorations);
},
Expand All @@ -82,7 +81,7 @@ const getTabDecorations = (state, view) => {
let textWidth = 0;

try {
view.state.doc.nodesBetween(pos - prevNodeSize - 1, pos - 1, (node, nodePos) => {
Comment thread
harbournick marked this conversation as resolved.
state.doc.nodesBetween(pos - prevNodeSize - 1, pos - 1, (node, nodePos) => {
if (node.isText && node.textContent !== ' ') {
const textWidthForNode = calcTextWidth(view, nodePos);
textWidth += textWidthForNode;
Expand Down