Skip to content

Commit

Permalink
Merge pull request ckeditor#10352 from ckeditor/ck/9672-modify-viewpo…
Browse files Browse the repository at this point in the history
…rTopOffset-in-runtime

Feature: Introduced `editor.ui.viewportOffset` that allows modifying the viewport's offset in runtime. This value is used by the editor to e.g. position its sticky toolbar and contextual balloons. Additionally, the `config.toolbar.viewportTopOffset` property was moved to `config.ui.viewportOffset` and it now accepts an object. Closes ckeditor#9672.

BREAKING CHANGE: The `config.toolbar.viewportTopOffset` property was moved to `config.ui.viewportOffset` and it now accepts an object.
  • Loading branch information
Reinmar authored Sep 6, 2021
2 parents e627e89 + 94f6451 commit a0b98a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ describe( 'ClassicEditor build', () => {
it( 'allows configuring toolbar offset without overriding toolbar items', () => {
return ClassicEditor
.create( editorElement, {
toolbar: {
viewportTopOffset: 42
ui: {
viewportOffset: {
top: 42
}
}
} )
.then( newEditor => {
Expand Down

0 comments on commit a0b98a8

Please sign in to comment.