Created attachment 161880 [details] The problematic document I have a pdf document with a form field that should (I guess) only accept numbers. By deliberate entering a non-digit I can make it show NaN. Afterwards, it is not possible to remove this NaN again. STEPS TO REPRODUCE 1. Open the attached document; click on 'show forms' 2. Click on the top left square (below "70 Liter") 3. Enter the letter X 4. Click outside of that square --> the X changes to NaN 5. Click into the square again --> the NaN changes back to X 6. Replace the X by a 2 7. Click on "hide forms" OBSERVED RESULT Instead of the number "2" the "NaN" is shown again. EXPECTED RESULT I am not quite sure what to expect. Should I be prevented from entering non-digits in the first place? At the very least I would expect to see a "2" at the end of the seven steps, not NaN. SOFTWARE/OS VERSIONS Betriebssystem: Debian GNU/Linux 12 KDE-Plasma-Version: 5.27.5 KDE-Frameworks-Version: 5.103.0 Qt-Version: 5.15.8
The form field uses the AFNumber_Keystroke script, which we don't implement (see https://invent.kde.org/graphics/okular/-/blob/master/core/script/builtin.js#L152) https://invent.kde.org/graphics/okular/-/merge_requests/519 covers this That means the expected behavior would be to reject any input that is not a digit or separator
https://invent.kde.org/graphics/okular/-/merge_requests/988 implements AFNumber_Keystroke, so it's no longer possible to enter non-numeric characters