diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ae636e35..035791ae 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -12,6 +12,7 @@ - `Fix` — Wrong element not highlighted anymore when popover opened. - `Fix` — When Tunes Menu open keydown events can not be handled inside plugins. - `Fix` — If a Tool specifies some tags to substitute on paste, all attributes of that tags will be removed before passing them to the tool. Possible XSS vulnerability fixed. +- `Fix` — Pasting from Microsoft Word to Chrome (Mac OS) fixed. Now if there is no image-tools connected, regular text content will be pasted. - `Fix` — Workaround for the HTMLJanitor bug with Tables (https://github.com/guardian/html-janitor/issues/3) added - `Improvement` — *Tools API* — `pasteConfig().tags` now support sanitizing configuration. It allows you to leave some explicitly specified attributes for pasted content. - `Improvement` — *CodeStyle* — [CodeX ESLint Config](https://github.com/codex-team/eslint-config) has bee updated. All ESLint/Spelling issues resolved diff --git a/src/components/modules/paste.ts b/src/components/modules/paste.ts index 3f313a67..bc568169 100644 --- a/src/components/modules/paste.ts +++ b/src/components/modules/paste.ts @@ -174,7 +174,7 @@ export default class Paste extends Module { // eslint-disable-next-line @typescript-eslint/no-explicit-any const includesFiles = types.includes ? types.includes('Files') : (types as any).contains('Files'); - if (includesFiles) { + if (includesFiles && !_.isEmpty(this.toolsFiles)) { await this.processFiles(dataTransfer.files); return;