UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

25 lines (24 loc) 739 B
export class FocusManager { constructor(canvasManager, owner, inputController, eventManager) { this.canvasManager = canvasManager; this.owner = owner; this.inputController = inputController; this.eventManager = eventManager; } set isInFocus(focused) { if (this.isFocus !== focused) { this.isFocus = focused; this.canvasManager.focusChanged(focused); } } get isInFocus() { return this.isFocus; } captureFocus() { if (this.owner.canCaptureFocus()) { this.owner.onCaptureFocus(); this.inputController.captureFocus(); this.eventManager.onFocusIn(); } } }