浏览代码

Make mention panel appear closer to text line.

Maciej Gołaszewski 6 年之前
父节点
当前提交
765f379632
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      packages/ckeditor5-mention/src/mentionui.js
  2. 4 4
      packages/ckeditor5-mention/tests/mentionui.js

+ 1 - 1
packages/ckeditor5-mention/src/mentionui.js

@@ -21,7 +21,7 @@ import MentionsView from './ui/mentionsview';
 import DomWrapperView from './ui/domwrapperview';
 import MentionListItemView from './ui/mentionlistitemview';
 
-const VERTICAL_SPACING = 5;
+const VERTICAL_SPACING = 3;
 
 /**
  * The mention UI feature.

+ 4 - 4
packages/ckeditor5-mention/tests/mentionui.js

@@ -155,25 +155,25 @@ describe( 'MentionUI', () => {
 					expect( caretSouthEast( caretRect, balloonRect ) ).to.deep.equal( {
 						left: 501,
 						name: 'caret_se',
-						top: 123
+						top: 121
 					} );
 
 					expect( caretNorthEast( caretRect, balloonRect ) ).to.deep.equal( {
 						left: 501,
 						name: 'caret_ne',
-						top: -55
+						top: -53
 					} );
 
 					expect( caretSouthWest( caretRect, balloonRect ) ).to.deep.equal( {
 						left: 301,
 						name: 'caret_sw',
-						top: 123
+						top: 121
 					} );
 
 					expect( caretNorthWest( caretRect, balloonRect ) ).to.deep.equal( {
 						left: 301,
 						name: 'caret_nw',
-						top: -55
+						top: -53
 					} );
 				} );
 		} );