Skip to content
Snippets Groups Projects
Commit b9df4998 authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'rs-dev-issue-2466' into 'master'

Remove style attribute from textarea during ZenMode activation

Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2466

Closes https://github.com/gitlabhq/gitlabhq/issues/8963

See merge request !1248
parents af35fc8c 38f1d571
Branches
Tags
No related merge requests found
Loading
@@ -38,6 +38,8 @@ class @ZenMode
Loading
@@ -38,6 +38,8 @@ class @ZenMode
@active_checkbox = $(checkbox) @active_checkbox = $(checkbox)
@active_checkbox.prop('checked', true) @active_checkbox.prop('checked', true)
@active_zen_area = @active_checkbox.parent().find('textarea') @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() @active_zen_area.focus()
   
exitZenMode: => exitZenMode: =>
Loading
Loading
Loading
@@ -29,6 +29,11 @@ describe 'ZenMode', ->
Loading
@@ -29,6 +29,11 @@ describe 'ZenMode', ->
enterZen() enterZen()
expect(Mousetrap.pause).toHaveBeenCalled() expect(Mousetrap.pause).toHaveBeenCalled()
   
it 'removes textarea styling', ->
$('textarea').attr('style', 'height: 400px')
enterZen()
expect('textarea').not.toHaveAttr('style')
describe 'in use', -> describe 'in use', ->
beforeEach -> beforeEach ->
enterZen() enterZen()
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment