Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't close the block toolbar #12184

Closed
Mgsy opened this issue Jul 29, 2022 · 6 comments · Fixed by #12254
Closed

Can't close the block toolbar #12184

Mgsy opened this issue Jul 29, 2022 · 6 comments · Fixed by #12254
Assignees
Labels
domain:accessibility This issue reports an accessibility problem. domain:ui/ux This issue reports a problem related to UI or UX. package:ui squad:features Issue to be handled by the Features team. type:bug This issue reports a buggy (incorrect) behavior. type:regression This issue reports a bug that was not present in the previous releases.

Comments

@Mgsy
Copy link
Member

Mgsy commented Jul 29, 2022

📝 Provide detailed reproduction steps (if any)

  1. Go to http://localhost:8081/ckeditor5/34.2.0/examples/builds/balloon-block-editor.html.
  2. Focus the editor.
  3. Open the block toolbar with a mouse click.
  4. Close the block toolbar with a mouse click.

✔️ Expected result

The block toolbar disappears.

❌ Actual result

It's impossible to close the block toolbar.

Notes

It's possible to close the block toolbar with Esc.


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

@Mgsy Mgsy added type:bug This issue reports a buggy (incorrect) behavior. type:regression This issue reports a bug that was not present in the previous releases. labels Jul 29, 2022
@mlewand
Copy link
Contributor

mlewand commented Jul 29, 2022

The difference is that during the (this side) button's execute event the toolbar is already hidden and focus is brought back to the button itself.

So this.panelView.isVisible is evaluating to false here:

if ( !this.panelView.isVisible ) {

This sounds to me like a result of focus management brought in #12162

@Dumluregn
Copy link
Contributor

This sounds to me like a result of focus management brought in #12162

I'd be surprised if that's true as we only touched the dropdown behaviour. I'll check if this issue was reproducible before merging that PR.

@Dumluregn
Copy link
Contributor

I checked the manual test http://localhost:8125/ckeditor5-build-balloon-block/tests/manual/ckeditor.html at the a0244b0 commit (so before all commits from #12162) and this problem is already present there.

@mlewand
Copy link
Contributor

mlewand commented Jul 29, 2022

Indeed the issue came from #12003

In a52516a we removed the prevent default method call for click event. This causes the button to gain focus and panel to close prematurely.

@mlewand mlewand added squad:features Issue to be handled by the Features team. domain:ui/ux This issue reports a problem related to UI or UX. domain:accessibility This issue reports an accessibility problem. labels Jul 29, 2022
@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Jul 29, 2022
@mlewand
Copy link
Contributor

mlewand commented Jul 29, 2022

A patch that fixes (this particular issue) is in https://github.com/ckeditor/ckeditor5/tree/ck/12184-closing-balloon-block-toolbar-focus

@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Aug 9, 2022
@mateuszzagorski
Copy link
Contributor

mateuszzagorski commented Aug 9, 2022

The patch in https://github.com/ckeditor/ckeditor5/tree/ck/12184-closing-balloon-block-toolbar-focus does not seem to resolve the issue on Safari.
I've prepared a solution for all of the issues on a separate branch -> ck/12184-balloon-block-toolbar-closing

oleq added a commit that referenced this issue Aug 30, 2022
…r-closing

Fix (ui): The block toolbar should close upon clicking its button. Closes #12184.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Aug 30, 2022
@CKEditorBot CKEditorBot added this to the iteration 57 milestone Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:accessibility This issue reports an accessibility problem. domain:ui/ux This issue reports a problem related to UI or UX. package:ui squad:features Issue to be handled by the Features team. type:bug This issue reports a buggy (incorrect) behavior. type:regression This issue reports a bug that was not present in the previous releases.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants