diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts index 5f903121a..981901ba0 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts @@ -157,7 +157,7 @@ export class FilePreviewScreenComponent tap(([selectedText, canPerformActions, file]) => { const isCurrentPageExcluded = file.isPageExcluded(this.pdf.currentPage); - if (selectedText.length > 2 && canPerformActions && !isCurrentPageExcluded) { + if ((selectedText.length > 2 || this._isJapaneseString(selectedText)) && canPerformActions && !isCurrentPageExcluded) { this.pdf.enable(textActions); } else { this.pdf.disable(textActions); @@ -777,4 +777,8 @@ export class FilePreviewScreenComponent const annotations = this._annotationManager.get(selected); this._annotationManager.select(annotations); } + + private _isJapaneseString(text: string) { + return text.match(/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/); + } }