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
This commit is contained in:
commit
b9df499860
2 changed files with 7 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue