瀏覽代碼

Fix findLinkRange usage, missed after merge.

Address https://github.com/ckeditor/ckeditor5/pull/7546#issuecomment-660961085.
Tomek Wytrębowicz 5 年之前
父節點
當前提交
97f0f5a2e3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/ckeditor5-link/src/linkediting.js

+ 1 - 1
packages/ckeditor5-link/src/linkediting.js

@@ -476,7 +476,7 @@ function shouldCopyAttributes( model ) {
 
 	// If nodes are not equal, maybe the link nodes has defined additional attributes inside.
 	// First, we need to find the entire link range.
-	const linkRange = findLinkRange( firstPosition, nodeAtFirstPosition.getAttribute( 'linkHref' ), model );
+	const linkRange = findAttributeRange( firstPosition, 'linkHref', nodeAtFirstPosition.getAttribute( 'linkHref' ), model );
 
 	// Then we can check whether selected range is inside the found link range. If so, attributes should be preserved.
 	return linkRange.containsRange( model.createRange( firstPosition, lastPosition ), true );