debian-mirror-gitlab/app/assets/javascripts/behaviors/autosize.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
328 B
JavaScript
Raw Normal View History

2018-03-17 18:26:18 +05:30
import Autosize from 'autosize';
2021-01-03 14:25:43 +05:30
import { waitForCSSLoaded } from '~/helpers/startup_css_helper';
2016-09-13 17:45:13 +05:30
2021-03-11 19:13:27 +05:30
waitForCSSLoaded(() => {
const autosizeEls = document.querySelectorAll('.js-autosize');
2016-09-13 17:45:13 +05:30
2021-03-11 19:13:27 +05:30
Autosize(autosizeEls);
Autosize.update(autosizeEls);
2020-11-24 15:15:51 +05:30
2021-03-11 19:13:27 +05:30
autosizeEls.forEach((el) => el.classList.add('js-autosize-initialized'));
2017-08-17 22:00:37 +05:30
});