Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
10d01f2bc0d5
Commit
38f1d571
authored
Sep 04, 2015
by
Robert Speicher
Browse files
Remove style attribute from textarea during ZenMode activation
Closes internal
https://dev.gitlab.org/gitlab/gitlabhq/issues/2466
parent
c84eb49b66f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/zen_mode.js.coffee
View file @
10d01f2b
...
...
@@ -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
:
=>
...
...
spec/javascripts/zen_mode_spec.js.coffee
View file @
10d01f2b
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment