diff --git a/src/modal/index.ts b/src/modal/index.ts index 1367ec8..5e9853d 100644 --- a/src/modal/index.ts +++ b/src/modal/index.ts @@ -14,10 +14,7 @@ import { import { createPopper, Instance as PopperInstance } from "@popperjs/core"; import { getIconModuleName, getIconNode, iconDefinitions } from "../util"; -import { - Admonition, - AdmonitionIconDefinition -} from "src/@types"; +import { Admonition, AdmonitionIconDefinition } from "src/@types"; import ObsidianAdmonition from "src/main"; class Suggester { @@ -147,6 +144,8 @@ export abstract class SuggestionModal extends FuzzySuggestModal { this.suggestEl = createDiv("suggestion-container"); + this.suggestEl.style.width = `${inputEl.clientWidth}px`; + this.contentEl = this.suggestEl.createDiv("suggestion"); this.suggester = new Suggester(this, this.contentEl, this.scope);