Skip to content

Commit

Permalink
Merge pull request #6551 from ckeditor/i/6087
Browse files Browse the repository at this point in the history
Docs: Mentioned the "Deep dive into focus tracking" guide in the "UI library" guide (see #6087).
  • Loading branch information
Reinmar authored Apr 7, 2020
2 parents 5f82935 + 5caaec0 commit bc5a783
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions docs/framework/guides/architecture/ui-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,12 @@ dropdownView.buttonView.on( 'execute', () => {

## Keystrokes and focus management

_Coming soon..._

The framework offers built–in classes that help manage keystrokes and focus in the UI. They are particularly useful when it comes to bringing accessibility features to the application.

<info-box>
If you want to know how the editor handles focus under the hood and what tools make it possible, check out the {@link framework/guides/deep-dive/focus-tracking **"Deep dive into focus tracking"**} guide.
</info-box>

### Focus tracker

The {@link module:utils/focustracker~FocusTracker `FocusTracker`} class can observe a number of HTML elements and determine if one of them is focused either by the user (clicking, typing) or using the `HTMLElement.focus()` DOM method.
Expand Down Expand Up @@ -488,6 +490,8 @@ focusTracker.on( 'change:isFocused', ( evt, name, isFocused ) => {

This information is useful when implementing a certain type of UI whose behavior depends on the focus, for example, contextual panels and floating balloons containing forms should hide when the user decides to abandon them.

Learn more about the focus tracker class in the {@link framework/guides/deep-dive/focus-tracking#using-the-focustracker-class "Deep dive into focus tracking"} guide.

### Keystroke handler

The {@link module:utils/keystrokehandler~KeystrokeHandler `KeystrokeHandler`} listens to the keystroke events fired by an HTML element or any of its descendants and executes pre–defined actions when the keystroke is pressed. Usually, each [view](#views) creates its own keystroke handler instance which takes care of the keystrokes fired by the elements the view has rendered.
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/guides/custom-editor-creator.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ mix( MultirootEditor, DataApiMixin );

## EditorUI class

The `*EditorUI` class is the main UI class which initializes UI components (the main view and the toolbar) and sets up mechanisms like focus tracker or placeholder management. The custom `*EditorUI` class should extend the {@link module:core/editor/editorui~EditorUI base `EditorUI` class} like below:
The `*EditorUI` class is the main UI class which initializes UI components (the main view and the toolbar) and sets up mechanisms like {@link framework/guides/deep-dive/focus-tracking#using-the-focustracker-class focus tracker} or placeholder management. The custom `*EditorUI` class should extend the {@link module:core/editor/editorui~EditorUI base `EditorUI` class} like below:

```js
import EditorUI from '@ckeditor/ckeditor5-core/src/editor/editorui';
Expand Down

0 comments on commit bc5a783

Please sign in to comment.