|
@@ -17,6 +17,7 @@ import KeyObserver from './observer/keyobserver';
|
|
|
import FakeSelectionObserver from './observer/fakeselectionobserver';
|
|
import FakeSelectionObserver from './observer/fakeselectionobserver';
|
|
|
import SelectionObserver from './observer/selectionobserver';
|
|
import SelectionObserver from './observer/selectionobserver';
|
|
|
import FocusObserver from './observer/focusobserver';
|
|
import FocusObserver from './observer/focusobserver';
|
|
|
|
|
+import CompositionObserver from './observer/compositionobserver';
|
|
|
|
|
|
|
|
import ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';
|
|
import ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';
|
|
|
import log from '@ckeditor/ckeditor5-utils/src/log';
|
|
import log from '@ckeditor/ckeditor5-utils/src/log';
|
|
@@ -47,6 +48,7 @@ import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
|
|
|
* * {@link module:engine/view/observer/focusobserver~FocusObserver},
|
|
* * {@link module:engine/view/observer/focusobserver~FocusObserver},
|
|
|
* * {@link module:engine/view/observer/keyobserver~KeyObserver},
|
|
* * {@link module:engine/view/observer/keyobserver~KeyObserver},
|
|
|
* * {@link module:engine/view/observer/fakeselectionobserver~FakeSelectionObserver}.
|
|
* * {@link module:engine/view/observer/fakeselectionobserver~FakeSelectionObserver}.
|
|
|
|
|
+ * * {@link module:engine/view/observer/compositionobserver~CompositionObserver}.
|
|
|
*
|
|
*
|
|
|
* This class also {@link module:engine/view/view~View#attachDomRoot bind DOM and View elements}.
|
|
* This class also {@link module:engine/view/view~View#attachDomRoot bind DOM and View elements}.
|
|
|
*
|
|
*
|
|
@@ -83,6 +85,7 @@ export default class View {
|
|
|
*/
|
|
*/
|
|
|
this._renderer = new Renderer( this.domConverter, this.document.selection );
|
|
this._renderer = new Renderer( this.domConverter, this.document.selection );
|
|
|
this._renderer.bind( 'isFocused' ).to( this.document );
|
|
this._renderer.bind( 'isFocused' ).to( this.document );
|
|
|
|
|
+ this._renderer.bind( 'isComposing' ).to( this.document );
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Roots of the DOM tree. Map on the `HTMLElement`s with roots names as keys.
|
|
* Roots of the DOM tree. Map on the `HTMLElement`s with roots names as keys.
|
|
@@ -138,6 +141,7 @@ export default class View {
|
|
|
this.addObserver( FocusObserver );
|
|
this.addObserver( FocusObserver );
|
|
|
this.addObserver( KeyObserver );
|
|
this.addObserver( KeyObserver );
|
|
|
this.addObserver( FakeSelectionObserver );
|
|
this.addObserver( FakeSelectionObserver );
|
|
|
|
|
+ this.addObserver( CompositionObserver );
|
|
|
|
|
|
|
|
// Inject quirks handlers.
|
|
// Inject quirks handlers.
|
|
|
injectQuirksHandling( this );
|
|
injectQuirksHandling( this );
|