Skip to content

fileuploader fixed - #123

Merged
veronika-tseleva-cleantalk merged 1 commit into
devfrom
fix_55346
Aug 21, 2026
Merged

fileuploader fixed#123
veronika-tseleva-cleantalk merged 1 commit into
devfrom
fix_55346

Conversation

@veronika-tseleva-cleantalk

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings August 21, 2026 11:09
@veronika-tseleva-cleantalk
veronika-tseleva-cleantalk merged commit ea48387 into dev Aug 21, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the screenshot/upload flow in FileUploader.makeScreenshot() to better handle cross-origin stylesheet (CORS) issues by detecting CSS access errors up front and favoring the html2canvas fallback when needed.

Changes:

  • Detects SecurityError when reading document.styleSheets[i].cssRules and skips dom-to-image when cross-origin CSS is present.
  • Improves dom-to-image error logging and adds a small-blob guard to treat near-empty results as failures.
  • Propagates the same logic into the distributed (bundled/minified) artifacts.

Reviewed changes

Copilot reviewed 1 out of 4 changed files in this pull request and generated 2 comments.

File Description
js/src/fileuploader.js Adds stylesheet CORS detection, adjusts dom-to-image execution/handling, and preserves html2canvas fallback behavior.
dist/doboard-widget-bundle.js Rebuilt bundle reflecting the updated screenshot logic.
dist/doboard-widget-bundle.min.js Rebuilt minified bundle reflecting the updated screenshot logic.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread js/src/fileuploader.js
Comment on lines +473 to 475
if (blob && blob.size < 100) {
blob = null;
}
Comment thread js/src/fileuploader.js
Comment on lines +437 to +439
try {
const rules = document.styleSheets[i].cssRules;
} catch (e) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants