Fix input field behaviour inside context menus (#7293)

This commit is contained in:
Michael Telatynski 2021-12-07 09:36:28 +00:00 committed by GitHub
parent 275e9c1d02
commit 2e4fe7891a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -73,7 +73,7 @@ import LegacyCommunityPreview from "./LegacyCommunityPreview";
// NB. this is just for server notices rather than pinned messages in general.
const MAX_PINNED_NOTICES_PER_ROOM = 2;
function getInputableElement(el: HTMLElement): HTMLElement | null {
export function getInputableElement(el: HTMLElement): HTMLElement | null {
return el.closest("input, textarea, select, [contenteditable=true]");
}