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

Text alternative balloon disappears after clicking on it #490

Closed
Mgsy opened this issue Jul 3, 2017 · 7 comments · Fixed by ckeditor/ckeditor5-image#139
Closed

Text alternative balloon disappears after clicking on it #490

Mgsy opened this issue Jul 3, 2017 · 7 comments · Fixed by ckeditor/ckeditor5-image#139
Assignees
Labels
package:image package:ui type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@Mgsy
Copy link
Member

Mgsy commented Jul 3, 2017

Steps to reproduce

  1. Go to http://localhost:8125/ckeditor5-presets/tests/manual/article.html
  2. Select the image.
  3. Choose Change image text alternative from the contextual toolbar.
  4. Click somewhere on the balloon (except the input).

Current result

The balloon closes immediately.

Notes

It's a twin of https://github.com/ckeditor/ckeditor5-link/issues/126

GIF

bug_cke5

Other information

OS: Windows 10, MacOS X
Browser: Chrome, Safari, Firefox, Edge, Opera
Release: 0.10.0

@Mgsy Mgsy added package:image package:ui type:bug This issue reports a buggy (incorrect) behavior. labels Jul 3, 2017
@Mgsy Mgsy changed the title Text alternative disappears after clicking on it Text alternative balloon disappears after clicking on it Jul 3, 2017
@Reinmar
Copy link
Member

Reinmar commented Aug 15, 2017

I can reproduce this issue.

@Reinmar Reinmar added this to the iteration 12 milestone Aug 15, 2017
@oleq
Copy link
Member

oleq commented Aug 24, 2017

This line is the source of the problem.

Things to check:

  • Why this listener has been created in the first place? I couldn't find anything similar in the Link feature.
  • Why doesn't it work anyway? ContextualBalloon registers its #view in editor.ui.focusTracker, so clicking it shouldn't make editor.ui.focusTracker#isFocused false.

@oleq
Copy link
Member

oleq commented Aug 24, 2017

It looks like the solution from ckeditor/ckeditor5-link@866fa49 (https://github.com/ckeditor/ckeditor5-link/issues/90) helps here. It does not answer the questions, though.

@oskarwrobel
Copy link
Contributor

Why doesn't it work anyway? ContextualBalloon registers its #view in editor.ui.focusTracker, so clicking it shouldn't make editor.ui.focusTracker#isFocused false.

It doesn't work because ContextualBalloon#view (BalloonPanelView) is not focusable anymore (doesn't have tabindex="-1") https://github.com/ckeditor/ckeditor5-ui/issues/206.

@oskarwrobel
Copy link
Contributor

Link balloon works like it should even after removing these hacks from the BPV:

https://github.com/ckeditor/ckeditor5-ui/blob/a21b0976641db4a6d45592b4369e22adece2b930/src/panel/balloon/balloonpanelview.js#L135-L141

@Reinmar
Copy link
Member

Reinmar commented Sep 5, 2017

Is it fixed now?

@oskarwrobel
Copy link
Contributor

Nope, ImageBalloon has to be improved. It should be focusable and use FocusCycler.

@oleq oleq self-assigned this Sep 8, 2017
oskarwrobel added a commit to ckeditor/ckeditor5-image that referenced this issue Sep 20, 2017
Feature: Keyboard navigation should work in the `TextAlternativeFormView`. Closes #40. Closes ckeditor/ckeditor5#490.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:image package:ui type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
4 participants