ckeditor / github-writer

GitHub Writer - WYSIWYG Rich-Text Editor for GitHub, powered by CKEditor.
https://ckeditor.com/
Other
379 stars 61 forks source link

Focus and selection are moved to the above widget/paragraph when the Heading or Code buttons are pressed #380

Closed dufipl closed 1 year ago

dufipl commented 1 year ago

📝 Provide detailed reproduction steps (if any)

  1. Build GH Writer on the ghw/epic/367-version-3510-bump branch
  2. Insert an image and paragraph of text below.
  3. Select the text and press the Heading button or the Code button on the toolbar

✔️ Expected result

Selection and focus remain on the text: focus heading GH writer expected

❌ Actual result

Focus and selection are moved to the widget above: focus heading GH writer actual

Additional information

It is a regression from the last release.


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

mlewand commented 1 year ago

First thing that I see is that the focus doesn't go back to the editing view once button's face is activated.

It might be that fixing it (making sure that the editable gets activated after pressing the button, as other buttons are) will solve the issue.

mateuszzagorski commented 1 year ago

When we'll bump the editor to version "^35.2.0" this issue will be resolved as there are some changes related to the toolbar focus behavior that we need.

mlewand commented 1 year ago

@mateuszzagorski can you verify this and close the issue if it is indeed fixed?

mateuszzagorski commented 1 year ago

After upgrading the editor version to 35.2.1 the behavior was still imperfect - so I've created a PR that should resolve all remaining issues.

mlewand commented 1 year ago

Fixed with https://github.com/ckeditor/github-writer/pull/404#pullrequestreview-1151030373