Clear out width on TextEditorElement only if autoWidth was previously on

This commit is contained in:
Antonio Scandurra
2016-08-17 18:05:16 +02:00
parent e71027ed36
commit 6f0fd965cd

View File

@@ -152,7 +152,7 @@ class TextEditorComponent
if (@newState.content.autoWidth isnt @oldState.content.autoWidth) or (@newState.content.width isnt @oldState.content.width)
if @newState.content.autoWidth
@hostElement.style.width = @newState.content.width + 'px'
else
else if @oldState.content.autoWidth
@hostElement.style.width = ''
@oldState.content.width = @newState.content.width