mirror of
https://github.com/atom/atom.git
synced 2026-02-17 01:51:54 -05:00
Fix measuring block dec. if adding them before updating element's width
This commit is contained in:
@@ -312,6 +312,11 @@ class TextEditorComponent {
|
||||
}
|
||||
})
|
||||
|
||||
if (this.resizeBlockDecorationMeasurementsArea) {
|
||||
this.resizeBlockDecorationMeasurementsArea = false
|
||||
this.refs.blockDecorationMeasurementArea.style.width = this.getScrollWidth() + 'px'
|
||||
}
|
||||
|
||||
this.blockDecorationsToMeasure.forEach((decoration) => {
|
||||
const {item} = decoration.getProperties()
|
||||
const decorationElement = TextEditor.viewForItem(item)
|
||||
@@ -1391,6 +1396,7 @@ class TextEditorComponent {
|
||||
if (!this.hasInitialMeasurements) this.measureDimensions()
|
||||
this.visible = true
|
||||
this.props.model.setVisible(true)
|
||||
this.resizeBlockDecorationMeasurementsArea = true
|
||||
this.updateSync()
|
||||
this.flushPendingLogicalScrollPosition()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user