-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Use a generic "widget with a selection handler" CSS class to make sure the handler is not cropped in all widgets #4598
Comments
I just found out that we have the But it's totally wrong... all widgets are selectable (like the media widget, it has no handler but you can select it by simply clicking it). So we don't need to add another class, all we need to do is use this class but we need to rename it to something that makes sense. This class should indicate there's a selection handler, not that the widget it selectable (a very broad term). |
Right now looks OK 👍
This looks promising so we shouldn't forget about it at least. Doing this right now without usages seems too early. But OTOH isn't a big change. |
Internal: Renamed the .ck-widget_selectable class to .ck-widget_with-selection-handler for better semantics (see ckeditor/ckeditor5-widget#66).
Internal: Renamed the .ck-widget_selectable class to .ck-widget_with-selection-handler for better semantics. Made the selection handler crop fix introduced in #214 generic for all widgets (see ckeditor/ckeditor5-widget#66).
Other: Renamed the .ck-widget_selectable class to .ck-widget_with-selection-handler for better semantics. Closes #66. BREAKING CHANGE: The .ck-widget_selectable class has been renamed to .ck-widget_with-selection-handler for better semantics.
A follow–up of https://github.com/ckeditor/ckeditor5-block-quote/issues/28 where we brought some CSS to make sure that the selection handler of the table widget is not cropped when the table is a first-child of the block-quote or root editable (anything with
overflow:hidden
).I think we should generalize the fix and instead of
we should refer to
when
toWidget( ..., { hasSelectionHandler: true } )
.This will make the fix generic and work with all widgets we (and 3rd party developers) create in the future without constant updates to CSS.
In the future, if we develop different positions of the seleciton handler, we might need to make things dynamic, e.g. different styles (
margin-top
) when.ck-widget.ck-widget_with-selection-handler.ck-widget.ck-widget_selection-handler_top
and (margin-botom
).ck-widget.ck-widget_with-selection-handler.ck-widget.ck-widget_selection-handler_bottom
but I'm just thinking aloud.cc @jodator @dkonopka
The text was updated successfully, but these errors were encountered: