Notes |
|
(0047459)
|
egoitz
|
2012-04-11 10:37
|
|
on utils.js, the order d.submit on submitForm method seems that is not doing anything. |
|
|
(0047472)
|
dbaz
|
2012-04-11 12:16
|
|
The issue is that if you try to print a document (example: "Sales Order" document) nothing happens. In "classic mode" it works ok.
In my research I have concluded that the problem is here:
https://code.openbravo.com/erp/devel/pi/file/9547870c49c8/src/org/openbravo/erpCommon/utility/reporting/printing/PrintOptions.html#l58 [^]
It seems that due to an internal js engine change in Chrome, this closePage is executed too quickly and something strange happens because, although the submission has been done to the hidden frame, the pdf never is downloaded.
It is important remark that in 3.0 mode the closePage at the end does a Smartclient popup close-click, and in 'classic mode' a simple "window.close()". It seems that Chrome handles ok the "window.close()" case, but whatever Smartclient does internally in this close-click crashes Chrome js engine for this specific action.
The only solution that seems to work is set a timeout (even with a 1ms timeout is enough).
This closePage() is widely used in classic processes, so maybe more classic popups could be broken because the same described problem.
Briefing, there are two different solutions:
a) Include the timeout in "PrintOptions.html" to fix this particular issue.
b) "Dead dogs don't bite", so include the timeout here
https://code.openbravo.com/erp/devel/pi/file/9547870c49c8/web/js/utils.js#l5441 [^]
so all the existing "closePage()" will have the timeout so all the potential issues mentioned before will be avoided. |
|
|
(0047473)
|
dbaz
|
2012-04-11 12:17
|
|
Finally is going to be implemented solution "b" in order to avoid other classic popups using "closePage" could have the same issue |
|
|
(0047479)
|
hgbot
|
2012-04-11 12:39
|
|
Repository: erp/devel/pi
Changeset: 5d52d838f233e929de906971f97e41a8b907ea74
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Apr 11 12:38:56 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5d52d838f233e929de906971f97e41a8b907ea74 [^]
Fixed issue 20234: 'Print' now works ok using Google Chrome 18.x.x.x
---
M src/org/openbravo/erpCommon/security/Login.html
M src/org/openbravo/erpCommon/security/Login_F1.html
M web/js/utils.js
---
|
|
|
|
Code reviewed and verified using Chrome 18.0.1025.142 |
|
|
|
|