8
0
Pārlūkot izejas kodu

Simplify the usage of UI bindings/handlers.

Aleksander Nowodzinski 9 gadi atpakaļ
vecāks
revīzija
8cc65ab3cb
1 mainītis faili ar 2 papildinājumiem un 4 dzēšanām
  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()
 		} );