Scope tag input select to tag block

This commit is contained in:
Liam 2024-11-16 12:30:22 -05:00
parent 282b8b7322
commit a7e58f5884

View file

@ -9,7 +9,7 @@ import { TermSuggestion } from './utils/suggestions';
export function setupTagsInput(tagBlock: HTMLDivElement) { export function setupTagsInput(tagBlock: HTMLDivElement) {
const form = assertNotNull(tagBlock.closest('form')); const form = assertNotNull(tagBlock.closest('form'));
const textarea = assertNotNull($<HTMLTextAreaElement>('.js-taginput-plain', tagBlock)); const textarea = assertNotNull($<HTMLTextAreaElement>('.js-taginput-plain', tagBlock));
const container = assertNotNull($<HTMLDivElement>('.js-taginput-fancy')); const container = assertNotNull($<HTMLDivElement>('.js-taginput-fancy', tagBlock));
const parentField = assertNotNull(tagBlock.parentElement); const parentField = assertNotNull(tagBlock.parentElement);
const setup = assertNotNull($<HTMLButtonElement>('.js-tag-block ~ button', parentField)); const setup = assertNotNull($<HTMLButtonElement>('.js-tag-block ~ button', parentField));
const inputField = assertNotNull($<HTMLInputElement>('input', container)); const inputField = assertNotNull($<HTMLInputElement>('input', container));