mirror of
https://github.com/atom/atom.git
synced 2026-02-11 23:25:03 -05:00
Write spec for TextEditorElement when autoHeight changes
This commit is contained in:
@@ -38,7 +38,8 @@ class TextEditorElement extends HTMLElement
|
||||
@setAttribute('tabindex', -1)
|
||||
|
||||
initializeContent: (attributes) ->
|
||||
@resetAutoHeight()
|
||||
unless @getModel().getAutoHeight()
|
||||
@style.height = "100%"
|
||||
|
||||
if @config.get('editor.useShadowDOM')
|
||||
@useShadowDOM = true
|
||||
@@ -193,8 +194,11 @@ class TextEditorElement extends HTMLElement
|
||||
@removeAttribute("mini")
|
||||
|
||||
resetAutoHeight: ->
|
||||
unless @getModel().getAutoHeight()
|
||||
@style.height = "100%"
|
||||
@views.updateDocument =>
|
||||
if @getModel().getAutoHeight()
|
||||
@style.height = ""
|
||||
else
|
||||
@style.height = "100%"
|
||||
|
||||
addEncodingAttribute: ->
|
||||
@dataset.encoding = @model.getEncoding()
|
||||
|
||||
Reference in New Issue
Block a user