Prevent block decorations from mistakenly wrapping during measurements

Before rendering block decorations, we read their heights by putting
them into a special div called `blockDecorationMeasurementsArea`.

Previously, this div was not explicitly sized, which was causing
decorations to wrap while being measured but not when actually rendering
them.

This commit fixes this inconsistency by explicitly styling the
measurement area so that it has the same width as the component scroll
width.
This commit is contained in:
Antonio Scandurra
2017-06-13 12:30:11 +02:00
parent 032dcd8bf4
commit 0a46c9ad7b
2 changed files with 11 additions and 1 deletions

View File

@@ -678,7 +678,8 @@ class TextEditorComponent {
style: {
contain: 'strict',
position: 'absolute',
visibility: 'hidden'
visibility: 'hidden',
width: this.getScrollWidth() + 'px'
}
})
}