Bug 474662

Summary: Norwegian withholding tax form - phone number not displayed properly
Product: [Applications] okular Reporter: andreaswuest
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, ppg.1382
Priority: NOR    
Version First Reported In: 23.08.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Problematic docuemnt
Screenshot of okular

Description andreaswuest 2023-09-18 16:55:15 UTC
Created attachment 161698 [details]
Problematic docuemnt

STEPS TO REPRODUCE
1. open attached document - and enter the form edit mode
2. Enter the phone number "+49 123 123123"  - with blanks!
3. leave form edit

OBSERVED RESULT
 "NaN" is displayed as phone number

EXPECTED RESULT
Phone number is display - however i would expect that the input field only accepts valid characters (as acrobat does).
Phone number seems to be dfined as a number field - so it only accepts (in acrobat)  the sign characters (+,-) when it is the first characters (but only once), plus the decimal separator (but only once) and no blanks. 

Okular accepts the sign characters at random positions and multiple times as well. Okular also accepts the blank character which it should not. => i would expect that okular behaves more like acrobat concerning the acceptance of valid characters.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Tuxedo OS
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
Comment 1 andreaswuest 2023-09-18 16:56:46 UTC
Created attachment 161699 [details]
Screenshot of okular
Comment 2 andreaswuest 2023-09-18 16:58:15 UTC
Okular also accepts normal text characters - however it should not accept non digit characters
Comment 3 Pratham Gandhi 2024-06-30 05:36:32 UTC
https://invent.kde.org/graphics/okular/-/merge_requests/988 implements AFNumber_Keystroke making the behavior consistent with Adobe Reader. You cannot now insert + sign at random positions or the blanks.