BigW Consortium Gitlab

Commit 38f1d571 by Robert Speicher

Remove style attribute from textarea during ZenMode activation

parent 50f76ae0
......@@ -38,6 +38,8 @@ class @ZenMode
@active_checkbox = $(checkbox)
@active_checkbox.prop('checked', true)
@active_zen_area = @active_checkbox.parent().find('textarea')
# Prevent a user-resized textarea from persisting to fullscreen
@active_zen_area.removeAttr('style')
@active_zen_area.focus()
exitZenMode: =>
......
......@@ -29,6 +29,11 @@ describe 'ZenMode', ->
enterZen()
expect(Mousetrap.pause).toHaveBeenCalled()
it 'removes textarea styling', ->
$('textarea').attr('style', 'height: 400px')
enterZen()
expect('textarea').not.toHaveAttr('style')
describe 'in use', ->
beforeEach ->
enterZen()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment