Created attachment 160593 [details] Sample PDF file SUMMARY A modal dialog is shown by the PDF form I'm trying to fill. It is just an informative dialog. The problem is that once closed, it shows up immediately again. This repeats indefinitely, which causes the form to be unfillable, and what's worse, Okular is captive in this dialog-loop, so it cannot be even closed by normal means. Using Okular v23.04.3, the latest version available in Flathub (https://flathub.org/apps/org.kde.okular) as of today. Underlying platform is Ubuntu 20.04. STEPS TO REPRODUCE 1. Open the PDF file that I'm attaching to this report. 2. A header bar shows up in Okular, saying that "This document has forms. Click on the button to interact with them, or use View -> Show Forms." Click the "Show Forms" button. 3. On the right-half of the document, on the first row that contains this text: (2) Tipo de documento de identidad DNI Pasaporte NIE T. Residencia Click on any of the checkboxes. For example, click on the checkbox under "DNI". 4. A dialog appears with this text: (1) En caso de Tarjeta de Residencia, indicar T (Temporal), P(Permanente), C(Comunitaria) And an OK button. OBSERVED RESULT Pressing the OK button closes the dialog, but it immediately appears again. The application is then permanently captured by this modal dialog, and neither of progressing with filling the form, or closing Okular, is possible. EXPECTED RESULT Pressing the OK button would close the dialog permanently. IF the reappearance of the dialog is caused by bad viewer logic of Okular: * Okular should be fixed to improve compatibility with documents like this one. IF the issue is caused by faulty logic of the document itself, and is not an issue in Okular itself, then: * Okular might try to be useful: detect the case and inform the user about it. * Okular ought to not allow a faulty document to make it into a dialog loop. For this, a reappearance limit would be a good idea, either as a fixed limit or as a UI checkbox in the dialog, giving the user the chance to silence future instances of that dialog. This is a pattern that I have seen successfully implemented in other software, such as web browsers. SOFTWARE/OS VERSIONS As per Flatpak package indicated above: Name Description Application ID Version Branch Remotes Okular Document Viewer org.kde.okular 23.04.3 stable flathub
Further info: This dialog doesn't show up at all in other PDF viewers I've tested: * Xreader v3.2.2 * Firefox v115 * Chromium v114 While these are indeed missing to show part of the PDF form to the user, the lucky consequence of that is that it becomes possible to actually fill the form successfully.
Created attachment 160597 [details] Video showing the expected behavior (using Acrobat Reader) Attaching a screen capture video where the expected behavior is shown. This was captured using Acrobat Reader on Windows. The "DNI", "Pasaporte" and "NIE" boxes can be marked as selected right away. The "T", "P", and "C" boxes should show the modal dialog once, and afterwards they get marked as selected.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/785
Git commit f940ca1e2eda350b6e556f21adbd330fc99f8bb2 by Albert Astals Cid. Committed on 02/08/2023 at 00:07. Pushed by aacid into branch 'master'. Forms: Don't run focusin action when gaining focus because of window management Adobe Reader doesn't do it, and with reason, because otherwise we end up with: * Run focus in script * script shows alert() * form loses focus and gains it again once the alert() is closed * infinite loop The same fix we did in e457ceb73146790c5d4a9914182433ab4002815e but for the rest of the widgets M +1 -1 part/formwidgets.cpp https://invent.kde.org/graphics/okular/-/commit/f940ca1e2eda350b6e556f21adbd330fc99f8bb2
Git commit 2e3163e621e84afd6d13429a6582ccdd9ea79c99 by Albert Astals Cid. Committed on 02/08/2023 at 00:16. Pushed by aacid into branch 'release/23.08'. Forms: Don't run focusin action when gaining focus because of window management Adobe Reader doesn't do it, and with reason, because otherwise we end up with: * Run focus in script * script shows alert() * form loses focus and gains it again once the alert() is closed * infinite loop The same fix we did in e457ceb73146790c5d4a9914182433ab4002815e but for the rest of the widgets (cherry picked from commit f940ca1e2eda350b6e556f21adbd330fc99f8bb2) M +1 -1 part/formwidgets.cpp https://invent.kde.org/graphics/okular/-/commit/2e3163e621e84afd6d13429a6582ccdd9ea79c99