# DialogPositionCallback

typedef

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-ui/src/dialog/dialog.ts#L535)

#### Parameters

* `dialogRect: Rect`

  The current `Rect` of the dialog view element.

* `visibleDomRootRect: Rect | null`

  The visible `Rect` of the DOM root element. This rect will be unavailable when the DOM root element is off the screen or cropped by overflowing parent.

* `domRootRect: Rect | null`

  The current `Rect` of the DOM root. This rect will be unavailable, e.g. when the DOM root element is completely hidden via CSS `display` property or detached from the DOM.

#### Returns

* `object | null`

  The coordinates of the dialog's position or `null` if the dialog should stay hidden.

---

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