mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
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:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user