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

switch (this.items.children.length) {
        case 0:
          node = new TextEdit({});
          this.ui.textEdit = node;
          break;
        case 1:
          node = new CheckButton({});
          this.ui.checkButton = node;
          break;
        case 2:
          node = new ChoiceList({});
          this.ui.choiceList = node;
          break;
      }
      this.ui[$appendChild](node);
    }
    if (
      !this.ui ||
      this.presence === "hidden" ||
      this.presence === "inactive" ||
      this.h === 0 ||
      this.w === 0
    ) {
      return HTMLResult.EMPTY;
    }
    if (this.caption) {
      
      
      
      delete this.caption[$extra];