-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[JS] Fix few bugs present in the pdf for issue #14862 #14869
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, with the comments fixed and all tests passing; thank you!
test/test_manifest.json
Outdated
}, | ||
{ "id": "issue14862", | ||
"file": "pdfs/issue14862.pdf", | ||
"md5": "e64d7f2dac11e124971f1901ba59cf9c", | ||
"rounds": 1, | ||
"link": false, | ||
"type": "other" | ||
}, | ||
{ "id": "issue14705", | ||
"file": "pdfs/issue14705.pdf", | ||
"md5": "4f203d3e60bde33103a92e24d7e5eb73", | ||
"rounds": 1, | ||
"link": false, | ||
"type": "other" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this, since it's not necessary when you're adding the test-cases directly to the repository.
Note that the purpose of "other" was just to allow using linked test-cases for unit/integration-tests without also needing to have them as reference tests. Hence an entry in this file is only needed in the "link": true,
case.
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @calixteman received. Current queue size: 1 Live output at: http://54.241.84.105:8877/7edb241c1f50f24/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @calixteman received. Current queue size: 1 Live output at: http://54.193.163.58:8877/1aeb25dc2e5fd08/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/7edb241c1f50f24/output.txt Total script time: 3.50 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/1aeb25dc2e5fd08/output.txt Total script time: 6.26 mins
|
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/dd8144ecbd65ea5/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/574e1a7c83b63e7/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/dd8144ecbd65ea5/output.txt Total script time: 3.27 mins
|
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/a3e46fd96e54bae/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 1 Live output at: http://54.193.163.58:8877/a56d22d3d60e57c/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/574e1a7c83b63e7/output.txt Total script time: 6.33 mins
|
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/a3e46fd96e54bae/output.txt Total script time: 4.69 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/a56d22d3d60e57c/output.txt Total script time: 7.57 mins
|
- since resetForm function reset a field value a calculateNow is consequently triggered. But the calculate callback can itself call resetForm, hence an infinite recursive loop. So basically, prevent calculeNow to be triggered by itself. - in Firefox, the letters entered in some fields were duplicated: "AaBb" instead of "AB". It was mainly because beforeInput was triggering a Keystroke which was itself triggering an input value update and then the input event was triggered. So in order to avoid that, beforeInput calls preventDefault and then it's up to the JS to handle the event. - fields have a property valueAsString which returns the value as a string. In the implementation it was wrongly used to store the formatted value of a field (2€ when the user entered 2). So this patch implements correctly valueAsString. - non-rendered fields can be updated in using JS but when they're, they must take some properties in the annotationStorage. It was implemented for field values, but it wasn't for display, colors, ... - it fixes mozilla#14862 and mozilla#14705.
Also, it seems that the |
It's very likely because of the error you caught (the typeof thing). |
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/bd7fc703d48e803/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/555057dcb6e1bc2/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/bd7fc703d48e803/output.txt Total script time: 4.27 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/555057dcb6e1bc2/output.txt Total script time: 7.62 mins
|
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/eb696ff51178cdd/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/6264bb94f3e52a6/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/eb696ff51178cdd/output.txt Total script time: 3.23 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/6264bb94f3e52a6/output.txt Total script time: 6.55 mins
|
…rmittent failures
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/e4ac8f9a3d97084/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/b491963cc4639ba/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/e4ac8f9a3d97084/output.txt Total script time: 4.33 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/b491963cc4639ba/output.txt Total script time: 7.95 mins
|
@Snuffleupagus, are you still ok with this change ? |
But the calculate callback can itself call resetForm, hence an infinite recursive loop.
So basically, prevent calculeNow to be triggered by itself.
It was mainly because beforeInput was triggering a Keystroke which was itself triggering
an input value update and then the input event was triggered.
So in order to avoid that, beforeInput calls preventDefault and then it's up to the JS to
handle the event.
implementation it was wrongly used to store the formatted value of a field (2€ when the user
entered 2). So this patch implements correctly valueAsString.
in the annotationStorage. It was implemented for field values, but it wasn't for
display, colors, ...