Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
3319c799
Commit
3319c799
authored
Jul 03, 2017
by
Bryce Johnson
Committed by
Clement Ho
Jul 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make autosize fields more performant and remove broken autosize handle
parent
049d4bae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
19 deletions
+4
-19
app/assets/javascripts/behaviors/autosize.js
app/assets/javascripts/behaviors/autosize.js
+4
-19
No files found.
app/assets/javascripts/behaviors/autosize.js
View file @
3319c799
import
autosize
from
'
vendor/autosize
'
;
import
autosize
from
'
vendor/autosize
'
;
$
(
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
$fields
=
$
(
'
.js-autosize
'
);
const
autosizeEls
=
document
.
querySelectorAll
(
'
.js-autosize
'
);
$fields
.
on
(
'
autosize:resized
'
,
function
resized
()
{
autosize
(
autosizeEls
);
const
$field
=
$
(
this
);
autosize
.
update
(
autosizeEls
);
$field
.
data
(
'
height
'
,
$field
.
outerHeight
());
});
$fields
.
on
(
'
resize.autosize
'
,
function
resize
()
{
const
$field
=
$
(
this
);
if
(
$field
.
data
(
'
height
'
)
!==
$field
.
outerHeight
())
{
$field
.
data
(
'
height
'
,
$field
.
outerHeight
());
autosize
.
destroy
(
$field
);
$field
.
css
(
'
max-height
'
,
window
.
outerHeight
);
}
});
autosize
(
$fields
);
autosize
.
update
(
$fields
);
$fields
.
css
(
'
resize
'
,
'
vertical
'
);
});
});
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