Closed Bug 1338448 Opened 8 years ago Closed 1 year ago

PDF Viewer has not been properly unfolded on a particular site

Categories

(Web Compatibility :: Site Reports, defect, P3)

Tracking

(firefox102 affected, firefox110 affected)

RESOLVED WORKSFORME
Tracking Status
firefox102 --- affected
firefox110 --- affected

People

(Reporter: euthanasia_waltz, Assigned: denschub)

References

()

Details

(Keywords: webcompat:site-wait, Whiteboard: [sitewait])

STR: 0. Make sure Options>Applications>Portable Document Format (PDF)>Preview in Firefox 1. Open http://hemeroteca.mundodeportivo.com/preview/1923/06/04/pagina-1/1383045/pdf.html AR: PDF is not shown. ER: PDF is shown. To reveal the PDF, it is necessary to resize content or window. a) Zoom in/out b) Resize window(or maximize) c) F12(w/docking window) PDF is rendered in <embed id="pdfHolder" src="http://hemeroteca-paginas.mundodeportivo.com/./EMD02/HEM/1923/06/04/MD19230604-001.pdf" style="height: 0px;"> This <embed> is inserted at http://hemeroteca.mundodeportivo.com/static/js/utils.js#237, and its height is adjusted at #593. Now, if I set breakpoint on #593 and run, when breaked at there(it occurs twice), take a breath, then hit F8 to continue, voila, the page is rendered normally, PDF is shown. This occurs with Firefox 32bit/64bit/51.0.1/54.0a1 on Windows10/LinuxMint. (maybe all) Google Chrome doesn't have this issue. Edge as well. I guess this is not a matter of the site. (maybe)
Maybe a PDF Viewer bug?
Component: DOM → PDF Viewer
Product: Core → Firefox
The page uses style="height: 0px; and window.onresize = adjustWidth;.
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Component: PDF Viewer → Desktop
Ever confirmed: true
Product: Firefox → Tech Evangelism
Summary: some web page is not rendered normally → PDF Viewer has not been properly unfolded on a particular site
Version: 51 Branch → unspecified
A few things... this document is in quirks mode. <embed id="pdfHolder" src="http://hemeroteca-paginas.mundodeportivo.com/./EMD02/HEM/1923/06/04/MD19230604-001.pdf" style="height: 0px;"> <body onload="init();"> init calls adjustWidth, in http://hemeroteca.mundodeportivo.com/static/js/utils.js var adjustWidth = function() { window.onresize = null; setTimeout( function(){ // alert('readyAgain'); window.onresize = adjustWidth; }, 20); ... $("#pdfHolder").each(function(){ this.style.height = this.offsetWidth * 1.2 + 'px'; }); } The first time this is called. offsetWidth of the <embed> element is 0, but gets a correct width on resize. This seems to be timing sensitive... if they just want to fix it, they can query offsetWidth after a short timeout: $("#pdfHolder").each(function(){ var self = this; setTimeout(function(){ self.style.height = self.offsetWidth * 1.2 + 'px'; }, 10); }); There's a super duper old bug that's possibly the cause, that hints at the timing thing as well: https://bugzilla.mozilla.org/show_bug.cgi?id=65548#c36 But, let's set to needscontact, because I doubt that bug will get fixed any time soon.
Depends on: 65548
Whiteboard: [needscontact]
Priority: -- → P3
Issue still exists, reaching out to atencionalcliente@clubvanguardia.com.
Whiteboard: [needscontact] → [sitewait]
Product: Tech Evangelism → Web Compatibility

See bug 1547409. Moving webcompat whiteboard tags to keywords.

The issue is still reproducible.
https://prnt.sc/Jo6K0hiIWV9d

Tested with:
Browser / Version: Firefox Nightly 102.0a1 (2022-05-16)
Operating System: Windows 10 Pro

Severity: normal → S3

I was able to reproduce the issue with the default settings of the browser.

Tested with:

Browser / Version: Firefox Release 108.0.2 (64-bit)/ Firefox Nightly 110.0a1 (2023-01-12) (64-bit)
Operating System: Windows 10 PRO x64

Notes:

  1. Reproducible regardless of the status of ETP.
  2. Reproducible on the latest build of Firefox Nightly and Release.
  3. Works as expected using Chrome.
Assignee: nobody → dschubert
Status: NEW → ASSIGNED

The site looks different now, the <embed> is an <iframe> now which makes this 11% more exciting, but this works for me.

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.