From 37165f3293292a251df57d8d7c42730fc32ee7c2 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 24 Jul 2014 18:11:10 -0700 Subject: [PATCH] Invoke pollDOM after attach so character width is calculated Now that we mount the react component in the constructor of the wrapper view, it's never actually visible at the time of mount. By invoking pollDOM manually after attaching and before emitting the attach event, the character width is available for the wrap guide to calculate its initial position. --- src/react-editor-view.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/react-editor-view.coffee b/src/react-editor-view.coffee index f7eba77b7..ef2a7673c 100644 --- a/src/react-editor-view.coffee +++ b/src/react-editor-view.coffee @@ -71,6 +71,7 @@ class ReactEditorView extends View return unless onDom return if @attached @attached = true + @component.pollDOM() @focus() if @focusOnAttach @trigger 'editor:attached', [this]