Skip to content

Commit 9c2eac0

Browse files
committed
#287 #314 - Fix for RichText view mode
1 parent a33ae6b commit 9c2eac0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/controls/richText/RichText.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
137137
if (this.props.isEditMode) {
138138
document.addEventListener('click', this.handleClickOutside);
139139
document.addEventListener('focus', this.handleClickOutside);
140-
}
141140

142-
const clientRect: ClientRect = this._wrapperRef.getBoundingClientRect();
143-
const parentClientRect: ClientRect = this._wrapperRef.parentElement.getBoundingClientRect();
144-
const toolbarTop: number = clientRect.top - parentClientRect.top - TOOLBARPADDING;
141+
const clientRect: ClientRect = this._wrapperRef.getBoundingClientRect();
142+
const parentClientRect: ClientRect = this._wrapperRef.parentElement.getBoundingClientRect();
143+
const toolbarTop: number = clientRect.top - parentClientRect.top - TOOLBARPADDING;
145144

146-
this.setState({
147-
wrapperTop: toolbarTop
148-
});
145+
this.setState({
146+
wrapperTop: toolbarTop
147+
});
148+
}
149149
}
150150

151151
/**

0 commit comments

Comments
 (0)