# ViewDocumentObserverSelectionChangeEvent

typedef

Fired when a selection has changed. This event is fired only when the selection change was the only change that happened in the document, and the old selection is different then the new selection.

Introduced by [`SelectionObserver`](module_engine_view_observer_selectionobserver-SelectionObserver.md).

Note that because [`SelectionObserver`](module_engine_view_observer_selectionobserver-SelectionObserver.md) is attached by the [`EditingView`](module_engine_view_view-EditingView.md) this event is available by default.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/view/observer/selectionobserver.ts#L430)

<a id="properties">

## Properties

<a id="member-args">

### `args: [ ViewDocumentObserverSelectionEventData ]`

<a id="member-name">

### `name: 'selectionChange'`

#### Value

`object`

## Fired by

* [ViewDocument#selectionChange](module_engine_view_document-ViewDocument.md#event-selectionChange)

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
