Procházet zdrojové kódy

Simplify the usage of UI bindings/handlers.

Aleksander Nowodzinski před 9 roky
rodič
revize
8cc65ab3cb
1 změnil soubory, kde provedl 2 přidání a 4 odebrání
  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()
 		} );