Attach (recommended) or Link to PDF file here:
https://www.canada.ca/content/dam/ircc/migration/ircc/english/pdf/kits/forms/eimm5669e.pdf
[eimm5669e.pdf](https://github.com/mozilla/pdf.js/files/7225677/eimm5669e.2.pdf)

Configuration:
- Web browser and its version: Firefox nightly
- Operating system and its version: Linux Debian

Steps to reproduce the problem:
1. Look at the bottom of page 2

if (this.caption && ["top", "bottom"].includes(this.caption.placement)) {
        captionHeight = this.caption.reserve;
        if (captionHeight <= 0) {
          captionHeight = this.caption[$getExtra](availableSpace).h;
        }
        const inputHeight = this.h - captionHeight - marginV - borderDims.h;
        ui.children[0].attributes.style.height = measureToString(inputHeight);
      } else {
        ui.children[0].attributes.style.height = "100%";
      }
    }
    if (!caption) {
      if (ui.attributes.class) {
        
        ui.attributes.class.push("xfaLeft");
      }
      this.w = savedW;
      this.h = savedH;
      return HTMLResult.success(createWrapper(this, html), bbox);
    }
    if (this.ui.button) {
      if (style.padding) {
        delete style.padding;
      }
      if (caption.name === "div") {
        caption.name = "span";
      }
      ui.children.push(caption);
      return HTMLResult.success(html, bbox);
    } else if (this.ui.checkButton) {