GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(canvas): clipboard init error · vanestone/lowcode-engine@adb9f6b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • designer/src/designer
      • clipboard.ts
    • types/src/shell/api
      • material.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/designer/src/designer/clipboard.ts‎

Copy file name to clipboardExpand all lines: packages/designer/src/designer/clipboard.ts
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ class Clipboard implements IClipboard {
7373
}
7474
const copyPaster = document.createElement<'textarea'>('textarea');
7575
copyPaster.style.cssText = 'position: absolute;left: -9999px;top:-100px';
76-
document.body.appendChild(copyPaster);
76+
if (document.body) {
77+
document.body.appendChild(copyPaster);
78+
} else {
79+
document.addEventListener('DOMContentLoaded', () => {
80+
document.body.appendChild(copyPaster);
81+
});
82+
}
7783
const dispose = this.initCopyPaster(copyPaster);
7884
return () => {
7985
dispose();
Collapse file

‎packages/types/src/shell/api/material.ts‎

Copy file name to clipboardExpand all lines: packages/types/src/shell/api/material.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface IPublicApiMaterial {
1515
* set data for Assets
1616
* @returns void
1717
*/
18-
setAssets(assets: IPublicTypeAssetsJson): void;
18+
setAssets(assets: IPublicTypeAssetsJson): Promise<void>;
1919

2020
/**
2121
* 获取「资产包」结构

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.