2017-10-31 09:18:30 +00:00
|
|
|
import Autosize from 'autosize';
|
2020-10-06 18:08:49 +00:00
|
|
|
import { waitForCSSLoaded } from '~/helpers/startup_css_helper';
|
2016-07-24 20:45:11 +00:00
|
|
|
|
2017-07-03 21:51:17 +00:00
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
2020-09-17 21:09:39 +00:00
|
|
|
waitForCSSLoaded(() => {
|
|
|
|
const autosizeEls = document.querySelectorAll('.js-autosize');
|
2016-07-24 20:45:11 +00:00
|
|
|
|
2020-09-17 21:09:39 +00:00
|
|
|
Autosize(autosizeEls);
|
|
|
|
Autosize.update(autosizeEls);
|
|
|
|
|
|
|
|
autosizeEls.forEach(el => el.classList.add('js-autosize-initialized'));
|
|
|
|
});
|
2017-03-27 01:33:47 +00:00
|
|
|
});
|