Behavior of delay property of Pdfium is different from Acrobat Reader
Reported by
chamal.d...@gmail.com,
Sep 2 2016
|
||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.89 Safari/537.36
Steps to reproduce the problem:
1. Open attached delaybehaviour.pdf file with chrome.
2. Click "Delay" button.
3. Alert box will display "Test".
Foxit PhantomPDF version 8.0.2.805 also has same behavior.
What is the expected behavior?
This is the behavior of Acrobat Reader DC version 15.017.20053. I am not exactly sure whether this is the correct behavior.
1. Open attached delaybehaviour.pdf file with chrome.
2. Click "Delay" button.
3. Alert box will display "B".
What went wrong?
This is Javascript executed when "Delay" button is pressed.
f = this.getField('txt1');
f.delay=true;
f.value = 'B';
app.alert(this.getField('txt1').value,3);
f.delay = false;
Acrobat Reader sets the value of "txt1" text field when "f.value = 'B';" is executed. Then paints that value when "f.delay = false;" is executed.
Pdfium and Foxit sets and paints value to text field when "f.delay = false;" is executed.
Did this work before? N/A
Chrome version: 53.0.2785.89 Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0
Please see page 426 of "JavaScript™ for Acrobat® API Reference" for a description of delay property.
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf
,
Sep 20 2016
Not sure, haven't checked. Just adding the right label for now.
,
Sep 20 2016
Yes, it repros: a) I see "Test" in the text box when the PDF first loads. b) When I press "Delay" the alert() dialog displays Test. c) Then the text box changes to "B". Acrobat Reader displays "B" in (b).
,
Oct 13 2016
,
Oct 13 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 13 2017
This seems like a difference in how JS is working. Sending over to dsinclair, since he knows about how we handle JS.
,
Oct 17 2017
Reading the document, our behaviour is incorrect. The delay flag will delay the 'Redrawing' of any changes. So, the setting of B should happen immediately, but the screen won't redraw until the delay is removed. When the field is read for the alert it should be the updated value. "Delays the redrawing of a field’s appearance. It is generally used to buffer a series of changes to the properties of the field before requesting that the field regenerate its appearance. Setting the property to true forces the field to wait until delay is set to false. The update of its appearance then takes place, redrawing the field with its latest settings" Passing over to hnakashima@ to triage for ProductExcellence.
,
Oct 12
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by chamal.d...@gmail.com
, Sep 14 2016