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.
This commit is contained in:
Nathan Sobo
2014-07-24 18:11:10 -07:00
parent f2507fc9d4
commit 37165f3293

View File

@@ -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]