diff --git a/framework/core/js/src/common/components/AutocompleteDropdown.tsx b/framework/core/js/src/common/components/AutocompleteDropdown.tsx index b314d881c7..68859dda7d 100644 --- a/framework/core/js/src/common/components/AutocompleteDropdown.tsx +++ b/framework/core/js/src/common/components/AutocompleteDropdown.tsx @@ -107,7 +107,7 @@ export default abstract class AutocompleteDropdown< m.redraw(); this.addEventListener('mouseup', (e) => e.preventDefault(), { once: true }); - this.dispatchEvent(new Event('select')); + this.select(); }); input.addEventListener('blur', () => { component.hasFocus = false; diff --git a/framework/core/js/src/common/components/EditUserModal.tsx b/framework/core/js/src/common/components/EditUserModal.tsx index 75a418dd8f..36707005ac 100644 --- a/framework/core/js/src/common/components/EditUserModal.tsx +++ b/framework/core/js/src/common/components/EditUserModal.tsx @@ -109,7 +109,7 @@ export default class EditUserModal { + let lastTop = container.scrollTop; + + return new Promise((resolve) => { + const animFrame = () => { + if (lastTop === container.scrollTop) { + resolve(); + } else { + requestAnimationFrame(animFrame); + lastTop = container.scrollTop; + } + }; + requestAnimationFrame(animFrame); + }); +} \ No newline at end of file diff --git a/framework/core/js/src/forum/components/AvatarEditor.js b/framework/core/js/src/forum/components/AvatarEditor.js index fd1da14226..c40ae7968e 100644 --- a/framework/core/js/src/forum/components/AvatarEditor.js +++ b/framework/core/js/src/forum/components/AvatarEditor.js @@ -149,15 +149,15 @@ export default class AvatarEditor extends Component { // Create a hidden HTML input element and click on it so the user can select // an avatar file. Once they have, we will upload it via the API. - const $input = $(''); - - $input - .appendTo('body') - .hide() - .click() - .on('input', (e) => { - this.upload($(e.target)[0].files[0]); - }); + const input = document.createElement('input'); + input.type = 'file'; + input.accept = '.jpg, .jpeg, .png, .bmp, .gif'; + input.style.display = 'none'; + input.click(); + input.addEventListener('input', (e) => { + this.upload(e.target.files[0]); + }); + document.body.append(input); } /** diff --git a/framework/core/js/src/forum/components/CommentPost.js b/framework/core/js/src/forum/components/CommentPost.js index ab17245794..7e61d3fb20 100644 --- a/framework/core/js/src/forum/components/CommentPost.js +++ b/framework/core/js/src/forum/components/CommentPost.js @@ -82,12 +82,12 @@ export default class CommentPost extends Post { // all of the