ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.58k stars 3.7k forks source link

Race condition between the link UI and the contextual toolbar #852

Closed oleq closed 10 months ago

oleq commented 6 years ago

🐞 Is this a bug report or feature request? (choose one)

💻 Version of CKEditor

master

📋 Steps to reproduce

  1. Visit http://localhost:8125/ckeditor5-editor-balloon/tests/manual/ballooneditor.html
  2. Follow the screencast kapture 2018-02-15 at 14 30 37

✅ Expected result

Which one should prevail? We need to understand which one has a greater priority in terms of UX.

❎ Actual result

UIs show up at random upon click.

📃 Other details that might be useful

Related https://github.com/ckeditor/ckeditor5/issues/845

cc @Reinmar @dkonopka

scofalik commented 6 years ago

For non-collapsed selection I think that toolbar should be shown. For collapsed it is discussible, but I also think that toolbar should be shown and the link ui will be still accessible through link icon.

oleq commented 6 years ago

The problem is that when a new link is created it gets selected as a whole. We'd need to drop this behavior.

Reinmar commented 6 years ago

The behaviour that link gets selected after it's created, theoretically, allows us to override link's text after we do https://github.com/ckeditor/ckeditor5-link/issues/73. So, I think that in such a case it should stay.

Alternatively, we could do the same thing which GDocs does, so add a "link text" input to the link balloon. And you can notice that GDocs makes a collapsed selection at the end of the newly inserted link.

BTW, this is actually a DUP of https://github.com/ckeditor/ckeditor5-link/issues/152. But I created #152 in non-general enough way, so I'll merge that one into this issue.

jodator commented 6 years ago

So for me it looks like the behavior is due to "double click" behavior that selects texts. In other words:

Reinmar commented 6 years ago

My comments from ckeditor/ckeditor5-link#152:

I actually lost confidence here when the link balloon pops up for non-collapsed selections.

PS. There's also an interesting behaviour in Letters which might be caused by the same issue:

dec-18-2017 16-09-02

And they are all related to https://github.com/ckeditor/ckeditor5-ui/issues/354.

jodator commented 6 years ago

Which one should prevail? We need to understand which one has a greater priority in terms of UX.

The problem in my opinion here is that both are required just in different contexts - as it is now...

When I click the link - the UI for changing/removing link looks OK.

When I select part of the text with link I might want to make something with that selection (like bold).

One solution is to add timeout and try to "detect" double click - but such solution would probably make normal single-click on link look sluggish :(.

Reinmar commented 6 years ago

This is annoying but not super common and we have more important things to fix now and there's no easy solution here, so I removed the milestone.

CKEditorBot commented 1 year ago

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot commented 11 months ago

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot commented 10 months ago

We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).