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

Action view shows up when it shouldn't #4820

Closed
scofalik opened this issue Feb 21, 2018 · 0 comments · Fixed by ckeditor/ckeditor5-link#226
Closed

Action view shows up when it shouldn't #4820

scofalik opened this issue Feb 21, 2018 · 0 comments · Fixed by ckeditor/ckeditor5-link#226
Labels
package:link type:bug This issue reports a buggy (incorrect) behavior.

Comments

@scofalik
Copy link
Contributor

When working on ckeditor/ckeditor5-link#169 I noticed that "action view toolbar" is shown when it shouldn't:

  1. Select some text, open link toolbar and click cancel.
  2. (With ckeditor/ckeditor5-link#169 fix) With a collapsed selection, open link toolbar, then click cancel or save.

I wanted to change _removeFormView method to that:

_removeFormView() {
	if ( this._isFormInPanel ) {
		this._balloon.remove( this.formView );

		if ( !this.editor.editing.model.document.selection.hasAttribute( 'linkHref' ) ) {
			this._hideUI();
		}

		// Because the form has an input which has focus, the focus must be brought back
		// to the editor. Otherwise, it would be lost.
		this.editor.editing.view.focus();
	}
}

I added the long if. Although it worked in manual testing, it caused automatic tests to crash, so maybe there is a better way to achieve that. I didn't want to dig deep into it since I am not that familiar w UI library and concepts.

oskarwrobel referenced this issue in ckeditor/ckeditor5-link May 21, 2019
Fix: Link balloon will not be shown if no link was added after command execution. Closes #171.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-link Oct 9, 2019
@mlewand mlewand added resolution:solved type:bug This issue reports a buggy (incorrect) behavior. package:link labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:link type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants