Enable prefer-arrow-callback linting rule and fix issues (#8594)

This commit is contained in:
Jon Koops
2022-10-20 00:10:54 +02:00
committed by GitHub
parent 5e66c62405
commit d777c79f7a
68 changed files with 1827 additions and 1856 deletions

View File

@ -22,12 +22,12 @@ function openDialog() {
document.body.insertBefore(dialog, document.body.firstChild);
document.body.classList.add('overflowHidden');
setTimeout(function () {
setTimeout(() => {
dialog.focus();
}, 100);
var closeBtn = document.querySelector('.close-dialog');
closeBtn.addEventListener('click', function () {
closeBtn.addEventListener('click', () => {
var dialog = document.getElementById('dialog');
document.body.removeChild(dialog);
document.body.classList.remove('overflowHidden');
@ -38,7 +38,7 @@ function openDialog() {
// keep focus in dialog
// https://css-tricks.com/a-css-approach-to-trap-focus-inside-of-an-element/
dialog.addEventListener('transitionend', function () {
dialog.addEventListener('transitionend', () => {
dialog.querySelector('iframe').focus();
});
}