[okular] [Bug 478540] New: Can't edit form field after entering invalid character

Tristan Miller bugzilla_noreply at kde.org
Fri Dec 15 09:57:47 GMT 2023


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

            Bug ID: 478540
           Summary: Can't edit form field after entering invalid character
    Classification: Applications
           Product: okular
           Version: 23.08.3
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: PDF backend
          Assignee: okular-devel at kde.org
          Reporter: psychonaut at nothingisreal.com
  Target Milestone: ---

Created attachment 164181
  --> https://bugs.kde.org/attachment.cgi?id=164181&action=edit
Example PDF showing the bug

Some PDF form fields require data in a certain format, and apply some sort of
validation to enforce this requirement. A common example are fields requiring a
telephone number. A problem with Okular is that if the user starts to type
invalid data into such a field, it is no longer possible for the user to edit
or delete the data.  I'm not sure if this is a problem with Okular itself (or
its underlying PDF library) or with how the form designer implemented their
field validation mechanism.  But even if it's the form designer's fault, it
would be nice if Okular could provide some way of overriding the validation and
allowing the user to delete the contents of the field.

This issue happens very often with forms that ask for a phone number and
require only numeric data (but don't tell the user this on the form itself). 
If one starts typing "+" as the prefix for the country code, the field refuses
to accept any further input, and it's also not possible to remove the "+" using
backspace, delete, undo, etc.  The only thing one can do is reload the form and
start filling it in all over again.

STEPS TO REPRODUCE
1. Open the attached PDF.
2. Press the "Show Forms" button.
3. Click on the field for the home phone number.  This field expects a
nine-digit phone number.
4. Type any character other than a digit, such as "+".

OBSERVED RESULT
5. At this point, the field largely stops responding to user input.  No further
data can be typed.  Pressing backspace has no effect. The Undo command has no
effect. Pressing the left cursor key puts the insertion point to the left of
the +, but pressing delete has no effect.  The + can be selected with the
mouse, but it cannot be deleted with backspace, delete, or the Cut command.

EXPECTED RESULT
5. Okular should allow the contents of the field to be edited, or at least the
Undo command should reset the field to its previously blank state.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11

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


More information about the Okular-devel mailing list