[FIX] web_editor: sign documents with safari 15.4+ with ios
Issue: ===== Users with IOS can't sign with safari. Steps to reproduce the issue: ============================= - Install sign - Make sure you have a template which has at least one signature sign item. - Share the document and open the link with ios on safari in v 15.4+ (browserstack) for example. - Go to the signature sign item and use auto and click sign or sign all - Nothing will happen. Origin of the issue: ==================== https://github.com/niklasvh/html2canvas/issues/2864 Solution: ========= https://github.com/niklasvh/html2canvas/issues/2864#issuecomment-1111044861 opw-3660682 closes odoo/odoo#149903 X-original-commit: f11723f406f2af95090bdd13e9acb30c89014638 Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit is contained in:
@@ -5603,15 +5603,19 @@
|
||||
return reject("No window assigned for iframe");
|
||||
}
|
||||
var documentClone = cloneWindow.document;
|
||||
cloneWindow.onload = iframe.onload = function () {
|
||||
cloneWindow.onload = iframe.onload = null;
|
||||
var interval = setInterval(function () {
|
||||
if (documentClone.body.childNodes.length > 0 && documentClone.readyState === 'complete') {
|
||||
clearInterval(interval);
|
||||
resolve(iframe);
|
||||
}
|
||||
}, 50);
|
||||
};
|
||||
/*
|
||||
ODOO Patch for safari v 15.4+ in ios: onload is never called.
|
||||
Issue link: https://github.com/niklasvh/html2canvas/issues/2864
|
||||
Suggested change: https://github.com/niklasvh/html2canvas/issues/2864#issuecomment-1111044861
|
||||
Version that solves the issue: not available yet
|
||||
*/
|
||||
var interval = setInterval(function () {
|
||||
if (documentClone.body.childNodes.length > 0 && (documentClone.readyState === 'complete' || documentClone.readyState === 'interactive')) {
|
||||
clearInterval(interval);
|
||||
resolve(iframe);
|
||||
}
|
||||
}, 50);
|
||||
// End patch
|
||||
});
|
||||
};
|
||||
var ignoredStyleProperties = [
|
||||
|
||||
Reference in New Issue
Block a user