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


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12809, comment 1

    v1 v2  
    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). You can also get the selection for the blurred editor instance and it should contain a widget.
     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 the 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:
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy