[okular] [Bug 519016] New: popUpMenuEx() shows pop up with rows "undefined"

schlimmchen bugzilla_noreply at kde.org
Thu Apr 16 09:02:51 BST 2026


https://bugs.kde.org/show_bug.cgi?id=519016

            Bug ID: 519016
           Summary: popUpMenuEx() shows pop up with rows "undefined"
    Classification: Applications
           Product: okular
      Version First 25.12.3
       Reported In:
          Platform: Flatpak
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: PDF backend
          Assignee: okular-devel at kde.org
          Reporter: 575dc95870 at posteo.net
  Target Milestone: ---

Created attachment 191545
  --> https://bugs.kde.org/attachment.cgi?id=191545&action=edit
ZIP with screenshots and sample PDF

SUMMARY
Pop up menus created with JS using "popUpMenuEx()" also render entries of type
"undefined".

The same PDF produces sensible pop up menus when viewed with Acrobat Reader or
Foxit Reader (on Windows, each), see the screenshots in the attachment.

I originally observed this on Linux, but this also occurs when using Okular on
Windows.

STEPS TO REPRODUCE
1. Open the attached PDF file in Okular.
2. Click the part (the yellow box) in the schematic.

OBSERVED RESULT
Notice a bunch of rows reading "undefined".

EXPECTED RESULT
The pop up shows only sensible non-undefined content.

SOFTWARE/OS VERSIONS
Windows: 25.08.1
Linux/KDE Plasma: 25.12.3 (flatpak)

ADDITIONAL INFORMATION
It seems that either a for-loop in the style of "for (i in arr)" should not
iterate array-prototype stuff (I don't know JavaScript well enough to judge
that), or that other readers skip entries that are of type "undefined" when
rendering the pop up menu, which makes sense to me.

I know that the PDF JS can be improved to avoid this issue, however, I argue
that robustness in popUpMenuEx() (which is implemented by the reader, as far as
I can tell) is desirable.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list