Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF - yellow fallback bar doesn't appear below URL bar on some files/links #12303

Closed
cfogelSV opened this issue Aug 31, 2020 · 4 comments
Closed

Comments

@cfogelSV
Copy link

Affected versions

  • 81.0b3, 81.0b4, 82.0a1 (2020-08-30);

Affected platforms

  • macOS 11.0, Windows 10, macOS 10.15

Steps to reproduce

  • pdfjs.renderInteractiveForms - true
  1. Launch Firefox;
  2. Access links such as: 1, 2;
  3. Click inside the page - on any form;

Expected result

  • yellow fallback bar should appear below URL bar;

Actual result

  • fallback bar not displayed;

Regression range

  • First bad: 2020-08-12;
  • Last good: 2020-08-13;
  • Pushlog: link;
  • Potential regressor: 1658934

Additional notes

  • S2 as suggested severity.
@Snuffleupagus
Copy link
Collaborator

yellow fallback bar should appear below URL bar;

No it shouldn't, since those forms contain functionality that's now supported; this the expected result of PR #12271 (which fixed issue #12217, that you filed :-)

@cfogelSV
Copy link
Author

Ok on that par. Thanks for the confirmation.

For irs.gov it still appears.
It's a bit unclear, as per notes in the 1661338 uplift the yellow bar is expected to be displayed.

Is it scripted different or does that form is of a different type?
If so, what are the key differences that we should look after from this point on?

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Aug 31, 2020

It's a bit unclear, as per notes in the 1661338 uplift the yellow bar is expected to be displayed.

Are you perhaps referring to https://bugzilla.mozilla.org/show_bug.cgi?id=1661338#c5?
If so, that simply fixed a regression that prevented the "Open With Different Viewer"-button from working if and only if the fallback bar is displayed, it does not at all imply that the fallback bar should be unconditionally displayed for all forms.

Is it scripted different or does that form is of a different type?

Please refer to #12271 (comment), and the commit messages in that PR for additional details.
Admittedly this is all pretty technical, and just opening a PDF document isn't usually enough to determine exactly what sort of form data it may contain (you really need to look at the actual data-structure of the PDF document itself).

If so, what are the key differences that we should look after from this point on?

This is what determines if the fallback bar is displayed, when encountering forms:

pdf.js/web/app.js

Lines 1445 to 1454 in aa27e7f

if (info.IsXFAPresent && !info.IsAcroFormPresent) {
console.warn("Warning: XFA is not supported");
this._delayedFallback(UNSUPPORTED_FEATURES.forms);
} else if (
(info.IsAcroFormPresent || info.IsXFAPresent) &&
!this.pdfViewer.renderInteractiveForms
) {
console.warn("Warning: Interactive form support is not enabled");
this._delayedFallback(UNSUPPORTED_FEATURES.forms);
}

For an individual PDF document, after loading it, executing PDFViewerApplication.documentInfo in the web-console shows you the corresponding values here.

@cfogelSV
Copy link
Author

cfogelSV commented Aug 31, 2020

Thanks again for clearing it out.
Closing this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants