소스 검색

Code refactoring in the bindTwoStepCaretToAttribute helper.

Aleksander Nowodzinski 7 년 전
부모
커밋
975b22feab
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      packages/ckeditor5-engine/src/utils/bindtwostepcarettoattribute.js

+ 2 - 2
packages/ckeditor5-engine/src/utils/bindtwostepcarettoattribute.js

@@ -350,7 +350,7 @@ class TwoStepCaretHandler {
 			// 		<paragraph><$text attribute>bar{}</$text></paragraph>
 			// 		<paragraph><$text attribute>bar</$text>{}</paragraph>
 			//
-			if ( position.isAtEnd && isAtBoundary( position, attribute ) ) {
+			if ( position.isAtEnd && isAtEndBoundary( position, attribute ) ) {
 				// DON'T ENGAGE 2-SCM if gravity is already overridden. The selection has the attribute already.
 				// This is a common selection if set using the mouse.
 				//
@@ -377,7 +377,7 @@ class TwoStepCaretHandler {
 			//
 			// 		<paragraph>{}<$text attribute>bar</$text></paragraph>
 			//
-			if ( position.isAtStart && isAtBoundary( position, attribute ) ) {
+			if ( position.isAtStart ) {
 				if ( this._hasSelectionAttribute ) {
 					this._removeSelectionAttribute();
 				}