Explorar o código

Hide mention ui panel when no items in list.

Maciej Gołaszewski %!s(int64=6) %!d(string=hai) anos
pai
achega
ee2c4a323b
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      packages/ckeditor5-mention/src/mentionui.js

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

@@ -126,7 +126,11 @@ export default class MentionUI extends Plugin {
 				items.add( { label: item } );
 			}
 
-			this._showForm();
+			if ( items.length ) {
+				this._showForm();
+			} else {
+				this._hideForm();
+			}
 		} );
 
 		watcher.on( 'unmatched', () => {