diff --git a/dist/doboard-widget-bundle.js b/dist/doboard-widget-bundle.js
index b6270cc..144af0c 100644
--- a/dist/doboard-widget-bundle.js
+++ b/dist/doboard-widget-bundle.js
@@ -13867,7 +13867,7 @@ class FileUploader {
}
});
- if (blob && blob.size < 100) {
+ if (blob && blob.size < 100) {
blob = null;
}
}
@@ -13895,9 +13895,13 @@ class FileUploader {
y: window.scrollY,
width: window.innerWidth,
height: window.innerHeight,
- windowWidth: document.documentElement.offsetWidth,
- windowHeight: document.documentElement.offsetHeight,
onclone: (clonedDoc) => {
+ clonedDoc.documentElement.style.width = window.innerWidth + 'px';
+ clonedDoc.documentElement.style.height = window.innerHeight + 'px';
+ clonedDoc.body.style.width = window.innerWidth + 'px';
+ clonedDoc.body.style.height = window.innerHeight + 'px';
+ clonedDoc.body.style.minHeight = window.innerHeight + 'px';
+
const transparentPixel = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
clonedDoc.querySelectorAll('img').forEach(img => {
diff --git a/dist/doboard-widget-bundle.min.js b/dist/doboard-widget-bundle.min.js
index f31ccc9..888d9d8 100644
--- a/dist/doboard-widget-bundle.min.js
+++ b/dist/doboard-widget-bundle.min.js
@@ -39,7 +39,7 @@
- `),A.querySelector(".doboard_task_widget__file-upload__remove-btn").addEventListener("click",()=>this.removeFile(t)),A}formatFileSize(A){var e;return 0===A?"0 Bytes":(e=Math.floor(Math.log(A)/Math.log(1024)),parseFloat((A/Math.pow(1024,e)).toFixed(2))+" "+this.SIZE_UNITS[e])}showError(A){this.errorMessage&&(this.errorMessage.textContent=A,this.errorMessage.style.display="block")}clearError(){this.errorMessage&&(this.errorMessage.textContent="",this.errorMessage.style.display="none")}hasFiles(){return 0A?.[e],A)}async sendSingleAttachment(A){A=await this.validateFileData(A);return attachmentAddDoboard(A)}async sendAttachmentsForComment(e,t,o){var i={preparedFilesCount:this.files.length,sentFilesCount:0,fileResults:[],success:!0};for(let A=0;A{var t;window.domtoimage?A(window.domtoimage):((t=document.createElement("script")).src="https://cdn.jsdelivr.net/npm/dom-to-image-more@3.1.6/dist/dom-to-image-more.min.js",t.onload=()=>A(window.domtoimage),t.onerror=()=>e(new Error("Failed to load dom-to-image-more")),document.head.appendChild(t))})}async makeScreenshot(){if(!this.files||!Array.isArray(this.files)||this.files.length>=this.maxFiles)console.log("SpotFix: File count limit reached.");else if("function"==typeof this.getTotalSize&&this.getTotalSize()>=this.maxTotalSize)console.log("SpotFix: Size limit reached.");else{let t=null,A=window.getComputedStyle(document.body).backgroundColor,o=("rgba(0, 0, 0, 0)"!==A&&"transparent"!==A||(A="#ffffff"),window.location.origin),e=!1;for(let A=0;A{if(A.classList&&A.classList.contains("doboard_task_widget"))return!1;if("NOSCRIPT"===A.tagName||"IFRAME"===A.tagName)return!1;if("IMG"===A.tagName&&A.src&&A.src.startsWith("http"))try{if(new URL(A.src).origin!==o&&!A.crossOrigin)return!1}catch(A){return!1}return!0}}))&&t.size<100&&(t=null)}catch(A){console.warn("SpotFix: dom-to-image failed.",A.message),t=null}if(!t)try{if("undefined"==typeof html2canvas)throw new Error("html2canvas is not defined");document.fonts&&document.fonts.ready&&await document.fonts.ready;let e=await html2canvas(document.body,{useCORS:!0,allowTaint:!1,logging:!1,backgroundColor:A,scale:window.devicePixelRatio||1,x:window.scrollX,y:window.scrollY,width:window.innerWidth,height:window.innerHeight,windowWidth:document.documentElement.offsetWidth,windowHeight:document.documentElement.offsetHeight,onclone:A=>{A.querySelectorAll("img").forEach(A=>{try{A.src&&A.src.startsWith("http")&&(new URL(A.src).origin===o||A.crossOrigin||(A.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",A.removeAttribute("srcset")))}catch(A){}}),A.querySelectorAll("iframe").forEach(A=>A.remove()),A.querySelectorAll(".doboard_task_widget").forEach(A=>A.style.display="none")}});if(!(t=await new Promise(A=>e.toBlob(A,"image/png"))))throw new Error("html2canvas returned empty canvas")}catch(A){return console.error(A),null}t&&(i=`Screenshot_${(i=new Date).getHours()}-${i.getMinutes()}_${i.getDate()}_${i.getMonth()+1}_${i.getFullYear()}.png`,i=new File([t],i,{type:"image/png",lastModified:Date.now()}),"function"==typeof this.validateFile)&&this.validateFile(i)&&(this.uploaderWrapper?.style&&(this.uploaderWrapper.style.display="block"),"function"==typeof this.clearError&&this.clearError(),"function"==typeof this.addFile)&&this.addFile(i)}}}class SpotFixTemplatesLoader{static getTemplateCode(A){var e=this[A];if("function"!=typeof e)throw new Error(`Template method '${A}' not found`);return e.call(this).trim()}static all_issues(){return`
+ `),A.querySelector(".doboard_task_widget__file-upload__remove-btn").addEventListener("click",()=>this.removeFile(t)),A}formatFileSize(A){var e;return 0===A?"0 Bytes":(e=Math.floor(Math.log(A)/Math.log(1024)),parseFloat((A/Math.pow(1024,e)).toFixed(2))+" "+this.SIZE_UNITS[e])}showError(A){this.errorMessage&&(this.errorMessage.textContent=A,this.errorMessage.style.display="block")}clearError(){this.errorMessage&&(this.errorMessage.textContent="",this.errorMessage.style.display="none")}hasFiles(){return 0A?.[e],A)}async sendSingleAttachment(A){A=await this.validateFileData(A);return attachmentAddDoboard(A)}async sendAttachmentsForComment(e,t,o){var i={preparedFilesCount:this.files.length,sentFilesCount:0,fileResults:[],success:!0};for(let A=0;A{var t;window.domtoimage?A(window.domtoimage):((t=document.createElement("script")).src="https://cdn.jsdelivr.net/npm/dom-to-image-more@3.1.6/dist/dom-to-image-more.min.js",t.onload=()=>A(window.domtoimage),t.onerror=()=>e(new Error("Failed to load dom-to-image-more")),document.head.appendChild(t))})}async makeScreenshot(){if(!this.files||!Array.isArray(this.files)||this.files.length>=this.maxFiles)console.log("SpotFix: File count limit reached.");else if("function"==typeof this.getTotalSize&&this.getTotalSize()>=this.maxTotalSize)console.log("SpotFix: Size limit reached.");else{let t=null,A=window.getComputedStyle(document.body).backgroundColor,o=("rgba(0, 0, 0, 0)"!==A&&"transparent"!==A||(A="#ffffff"),window.location.origin),e=!1;for(let A=0;A{if(A.classList&&A.classList.contains("doboard_task_widget"))return!1;if("NOSCRIPT"===A.tagName||"IFRAME"===A.tagName)return!1;if("IMG"===A.tagName&&A.src&&A.src.startsWith("http"))try{if(new URL(A.src).origin!==o&&!A.crossOrigin)return!1}catch(A){return!1}return!0}}))&&t.size<100&&(t=null)}catch(A){console.warn("SpotFix: dom-to-image failed.",A.message),t=null}if(!t)try{if("undefined"==typeof html2canvas)throw new Error("html2canvas is not defined");document.fonts&&document.fonts.ready&&await document.fonts.ready;let e=await html2canvas(document.body,{useCORS:!0,allowTaint:!1,logging:!1,backgroundColor:A,scale:window.devicePixelRatio||1,x:window.scrollX,y:window.scrollY,width:window.innerWidth,height:window.innerHeight,onclone:A=>{A.documentElement.style.width=window.innerWidth+"px",A.documentElement.style.height=window.innerHeight+"px",A.body.style.width=window.innerWidth+"px",A.body.style.height=window.innerHeight+"px",A.body.style.minHeight=window.innerHeight+"px";A.querySelectorAll("img").forEach(A=>{try{A.src&&A.src.startsWith("http")&&(new URL(A.src).origin===o||A.crossOrigin||(A.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",A.removeAttribute("srcset")))}catch(A){}}),A.querySelectorAll("iframe").forEach(A=>A.remove()),A.querySelectorAll(".doboard_task_widget").forEach(A=>A.style.display="none")}});if(!(t=await new Promise(A=>e.toBlob(A,"image/png"))))throw new Error("html2canvas returned empty canvas")}catch(A){return console.error(A),null}t&&(i=`Screenshot_${(i=new Date).getHours()}-${i.getMinutes()}_${i.getDate()}_${i.getMonth()+1}_${i.getFullYear()}.png`,i=new File([t],i,{type:"image/png",lastModified:Date.now()}),"function"==typeof this.validateFile)&&this.validateFile(i)&&(this.uploaderWrapper?.style&&(this.uploaderWrapper.style.display="block"),"function"==typeof this.clearError&&this.clearError(),"function"==typeof this.addFile)&&this.addFile(i)}}}class SpotFixTemplatesLoader{static getTemplateCode(A){var e=this[A];if("function"!=typeof e)throw new Error(`Template method '${A}' not found`);return e.call(this).trim()}static all_issues(){return`