RED-6217: Removed the 3 character limitation for non-latin strings.
This commit is contained in:
parent
45d3b08043
commit
6dba92702f
@ -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]/);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user