Skip to content

Commit

Permalink
fix: Admonition suggestor is now the full width of the input element (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Feb 25, 2022
1 parent 202b826 commit a3b3c54
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> {
Expand Down Expand Up @@ -147,6 +144,8 @@ export abstract class SuggestionModal<T> extends FuzzySuggestModal<T> {

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);
Expand Down

0 comments on commit a3b3c54

Please sign in to comment.