Attach (recommended) or Link to PDF file here:
[mytestfile.pdf](https://github.com/mozilla/pdf.js/files/7190033/mytestfile.pdf)

Configuration:
- Web browser and its version: Firefox nightly
- Operating system and its version: linux debian

Steps to reproduce the problem:
1. Open the pdf  
2. Click on the yellow area

What is the expected behavior? (add screenshot)
The text layout should be RTL.

What went wrong? (add screenshot)
The text layout is LTR.

It works correctly in evince and in acrobat.
I added a `dir="rtl"` on the `p` element in using devtools and the rendering is the same as in acrobat.

const firstParent = new Dict(
      firstParent.set("T", "foo"
      const secondParent = new Dict(
      secondParent.set("Parent", firstParent
      secondParent.set("T", "bar"
      widgetDict.set("Parent", secondParent
      widgetDict.set("T", "baz"
      const widgetRef = Ref.get(22, 0
      const xref = new XRefMock([{ ref: widgetRef, data: widgetDict }]
      const { data } = await AnnotationFactory.create(
        xref,
        widgetRef,
        pdfManagerMock,
        idFactoryMock
      
      expect(data.annotationType).toEqual(AnnotationType.WIDGET
      expect(data.fieldName).toEqual("foo.bar.baz"
    }
    it(
      "should construct the field name if a parent is not a dictionary " +
        "(issue 8143)",
      async function () {
        const parentDict = new Dict(
        parentDict.set("Parent", null
        parentDict.set("T", "foo"
        widgetDict.set("Parent", parentDict
        widgetDict.set("T", "bar"
        const widgetRef = Ref.get(22, 0
        const xref = new XRefMock([{ ref: widgetRef, data: widgetDict }]
        const { data } = await AnnotationFactory.create(