Changes between Initial Version and Version 1 of Ticket #12809, comment 1


Ignore:
Timestamp:
Jan 13, 2015, 11:13:07 AM (9 years ago)
Author:
Piotrek Koszuliński
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12809, comment 1

    initial v1  
    55Now, someone clicks one of these widgets. You could say that someone selected it and that's true - the widget wrapper got the `cke_widget_selected` class and was added to the [http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-property-selected repository.selected] array. However, widget is now in a different state than in the previous (select-all) case - now it got the focus. Hence, it also got the `cke_widget_focused` class and [http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-property-focused  repository.focused] was set. (Note that the blue outline is added by the `cke_widget_focused` class.)
    66
    7 The above explains the difference between focused and selected states, but of course it is not an answer to your question. The missing piece is that when an editor is blurred it retains a selection. Together with the editor the widget loses focus too, but it stays selected. You can check this by using TAB key to focus the editor - the widget will be focused again (this side effect may not work in some cases).
     7The above explains the difference between focused and selected states, but of course it is not an answer to your question. The missing piece is that when an editor is blurred it retains a selection. Together with the editor the widget loses focus too, but it stays selected. You can check this by using TAB key to focus the editor - the widget will be focused again (this side effect may not work in some cases). You can also get the selection for the blurred editor instance and it should contain a widget.
    88
    99The selection saving feature exists for at least two reasons:
    1010
    11 * It is true in native implementations as well - note that when you're using the classic (iframed) editor, when you made a selection inside it and then clicked outside, the text is still selected inside the editor, but a colour of the selection changes. Basically - there's one selection per document.
     11* It is true in native implementations as well. When you're using the classic (iframed) editor, when you made a selection inside it and then clicked outside, the text is still selected inside the editor, but a colour of the selection changes. Basically - there's one selection per document (in all browsers except IEs, but it will change in the future, because this is being standardised).
    1212* Without it it wouldn't be possible to implement dialogs and other focusable components around the editable. For instance when committing a dialog, the editor wouldn't know where to insert the new table or image. It must remember where was the selection even though selections were made in some other fields in the meantime.
    1313
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy