|
|
@@ -87,7 +87,7 @@ export default class WidgetResize extends Plugin {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- const redrawFocusedResizerThrottled = throttle( redrawFocusedResizer, 200 ); // 5fps
|
|
|
+ const redrawFocusedResizerThrottled = throttle( redrawFocusedResizer, 50 ); // 5fps
|
|
|
|
|
|
// Redraws occurring upon a change of visible resizer must not be throttled, as it is crucial for the initial
|
|
|
// render. Without it the resizer frame would be misaligned with resizing host for a fraction of second.
|
|
|
@@ -106,6 +106,16 @@ export default class WidgetResize extends Plugin {
|
|
|
|
|
|
this._visibleResizer = this._getResizerByViewElement( selectedElement ) || null;
|
|
|
} );
|
|
|
+
|
|
|
+ // Currently, we have set the `redrawFocusedResizerThrottled()` callback on every editor's `update`,
|
|
|
+ // which doesn't stop executing when we click outside the editor.
|
|
|
+ // We should reset the `#_visibleResizer` to stop redrawing the ResizeWidget's handles when they are not in use.
|
|
|
+ // ATM, constantly redrawing widget is hard to be set disabled.
|
|
|
+ this.editor.ui.view.editable.on( 'change:isFocused', () => {
|
|
|
+ if ( !this.editor.ui.view.editable.isFocused ) {
|
|
|
+ this._visibleResizer = null;
|
|
|
+ }
|
|
|
+ } );
|
|
|
}
|
|
|
|
|
|
/**
|