Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab FOSS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab FOSS
Merge requests
!14401
IssueNotes: Resize comment form after note submit and discard.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
IssueNotes: Resize comment form after note submit and discard.
acet-fix-comment-form-resize
into
master
Overview
1
Commits
1
Pipelines
1
Changes
2
Merged
Fatih Acet
requested to merge
acet-fix-comment-form-resize
into
master
7 years ago
Overview
1
Commits
1
Pipelines
1
Changes
2
Expand
Fixes
#38115 (closed)
Before
After
Fixes
#38115 (closed)
Edited
7 years ago
by
Fatih Acet
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
d9a3bbce
1 commit,
7 years ago
2 files
+
22
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
app/assets/javascripts/notes/components/issue_comment_form.vue
+
8
−
0
Options
@@ -2,6 +2,7 @@
/* global Flash, Autosave */
import
{
mapActions
,
mapGetters
}
from
'
vuex
'
;
import
_
from
'
underscore
'
;
import
autosize
from
'
vendor/autosize
'
;
import
'
../../autosave
'
;
import
TaskList
from
'
../../task_list
'
;
import
*
as
constants
from
'
../constants
'
;
@@ -124,6 +125,7 @@
}
this
.
isSubmitting
=
true
;
this
.
note
=
''
;
// Empty textarea while being requested. Repopulate in catch
this
.
resizeTextarea
();
this
.
saveNote
(
noteData
)
.
then
((
res
)
=>
{
@@ -174,6 +176,7 @@
if
(
shouldClear
)
{
this
.
note
=
''
;
this
.
resizeTextarea
();
}
// reset autostave
@@ -205,6 +208,11 @@
selector
:
'
.notes
'
,
});
},
resizeTextarea
()
{
this
.
$nextTick
(()
=>
{
autosize
.
update
(
this
.
$refs
.
textarea
);
});
},
},
mounted
()
{
// jQuery is needed here because it is a custom event being dispatched with jQuery.
Loading