Selaa lähdekoodia

Simplify the usage of UI bindings/handlers.

Aleksander Nowodzinski 9 vuotta sitten
vanhempi
commit
8cc65ab3cb
1 muutettua tiedostoa jossa 2 lisäystä ja 4 poistoa
  1. 2 4
      packages/ckeditor5-link/src/link.js

+ 2 - 4
packages/ckeditor5-link/src/link.js

@@ -164,16 +164,14 @@ export default class Link extends Feature {
 		// Close on `ESC` press.
 		escPressHandler( {
 			emitter: balloonPanelView,
-			model: balloonPanelView,
-			activeIf: 'isVisible',
+			activator: () => balloonPanelView.isVisible,
 			callback: () => this._hidePanel( true )
 		} );
 
 		// Close on click outside of balloon panel element.
 		clickOutsideHandler( {
 			emitter: balloonPanelView,
-			model: balloonPanelView,
-			activeIf: 'isVisible',
+			activator: () => balloonPanelView.isVisible,
 			contextElement: balloonPanelView.element,
 			callback: () => this._hidePanel()
 		} );