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
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,14 @@ export class FormattingToolbarView implements PluginView {
// individually in each button.
const newReferencePos = this.getSelectionBoundingBox();

// Workaround to ensure the correct reference position when rendering
// Workaround to ensure the correct reference position when rendering
// React components. Without this, e.g. updating styles on React inline
// content causes the formatting toolbar to be in the wrong place. We
// know the component has not yet rendered if the reference position has
// content causes the formatting toolbar to be in the wrong place. We
// know the component has not yet rendered if the reference position has
// zero dimensions.
if (
newReferencePos.x === 0 ||
newReferencePos.y === 0 ||
newReferencePos.width === 0 ||
newReferencePos.height === 0
) {
// Updates the reference position again following the render.
Expand Down
Loading