void waitForNextLayout()

in src/plugin/fieldViews/TextFieldView.ts [147:177]


      void waitForNextLayout().then(() => {
        if (!this.innerEditorView) {
          return;
        }

        const { lineHeight, paddingTop } = window.getComputedStyle(
          this.innerEditorView.dom
        );

        const domElement = this.innerEditorView.dom as HTMLDivElement;
        if (enableMultiline) {
          const initialInputHeightPx = `${
            parseInt(lineHeight, 10) * rows + parseInt(paddingTop) * 2
          }px`;
          domElement.style.minHeight = initialInputHeightPx;
          if (isResizeable) {
            // If the input is resizeable, assume that the user would like the input
            // to begin life with its height set to `rows`, with the opportunity to
            // expand it later.
            domElement.style.height = initialInputHeightPx;
          }
        }

        if (maxRows !== undefined) {
          const maxHeightPx = `${
            parseInt(lineHeight, 10) * maxRows + parseInt(paddingTop)
          }px`;
          domElement.style.maxHeight = maxHeightPx;
          domElement.style.overflowY = "scroll";
        }
      });