Open mabryl opened 7 months ago
Introduced here https://github.com/ckeditor/ckeditor5/pull/17013 , this region is causing issue:
// Watch scroll event only when the button is visible, it prevents attaching the scroll event listener
// to the document when the button is not visible.
buttonView.on<ObservableChangeEvent<boolean>>( 'change:isVisible', ( evt, name, isVisible ) => {
if ( isVisible ) {
buttonView.listenTo( global.document, 'scroll', repositionOnScroll, {
useCapture: true,
usePassive: true
} );
} else {
buttonView.stopListening( global.document, 'scroll', repositionOnScroll );
}
} );
📝 Provide detailed reproduction steps (if any)
✔️ Expected result
The editor should be focused back where the selection was, as is the case when no dropdown is open:
https://github.com/ckeditor/ckeditor5/assets/72079603/be619139-6161-40e8-9971-53f35d6a03a5
❌ Actual result
The editor will scroll up to the top of the editable, even though the text is still selected:
https://github.com/ckeditor/ckeditor5/assets/72079603/0d20a5cd-2b8c-4285-b559-bce5ba6e5d8e
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.