Closed Bug 1794403 Opened 2 years ago Closed 2 years ago

Drop-down text is not properly aligned inside PDF forms

Categories

(Firefox :: PDF Viewer, defect, P1)

Firefox 107
Desktop
All
defect

Tracking

()

VERIFIED FIXED
108 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox105 --- unaffected
firefox106 --- unaffected
firefox107 --- wontfix
firefox108 --- verified

People

(Reporter: atrif, Assigned: calixte)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image PDF_form_00.png

Found in

  • 107.0a1 (20221010033207)

Affected versions

  • 107.0a1 (20221010033207)

Tested platforms

  • Affected platforms: Windows 10x64, Ubuntu 20.04
  • Unaffected platform: macOS 11.6

Steps to reproduce

  1. Open http://foersom.com/net/HowTo/data/OoPdfFormExample.pdf.
  2. Click on The Country dropdown and choose a value.

Expected result

  • The text is properly displayed for each value.

Actual result

  • Some values are slightly cut off.

Regression range

Additional notes

  • Attached a screenshot with the issue.
  • I cannot reproduce the issue on macOS 11.5. On Windows 10x64 the issue is not so visible. The issue is more visible on Ubuntu 20.04.
Severity: S4 → S3
Priority: -- → P3

(In reply to Calixte Denizet (:calixte) from comment #1)

It's because of:
https://github.com/mozilla/pdf.js/commit/07cd7cb3dce4a4af1d555002486c15a5ed4b5302#diff-4748c83592581d85910b4a948677ddfcd25c8dc68ffcd20c524e0f4f0739f51aR92
Reverting the border to 1px for choiceWidgetAnnotation is fixing the issue.

Given that the border now takes up more space than before, should we perhaps reduce the font-size accordingly to compensate?

We should likely do something around:
https://github.com/mozilla/pdf.js/blob/master/src/display/annotation_layer.js#L986
Since it was ok for a border equals to 1px, likely removing 1 to the height should be enough.

Assignee: nobody → cdenizet
Status: NEW → ASSIGNED
Priority: P3 → P1

Since this is reoccuring, we should try to add some kind of automated test.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(cdenizet)
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch

We already have some tests for that, but the bug here depends of the default font used in the dropdown.

Flags: needinfo?(cdenizet)

Verified fixed with Firefox 108.0a1 (2022-10-27) on Windows 10x64, macOS 12 and Ubuntu 20.04. The text is no longer clipped after following the steps from comment 0.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: