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

Image should re-render view on load #5118

Closed
oskarwrobel opened this issue Sep 25, 2017 · 7 comments · Fixed by ckeditor/ckeditor5-image#215
Closed

Image should re-render view on load #5118

oskarwrobel opened this issue Sep 25, 2017 · 7 comments · Fixed by ckeditor/ckeditor5-image#215
Assignees
Labels
package:image type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@oskarwrobel
Copy link
Contributor

[edited]
Sometimes the source of the image element is loaded async and this causes layout change. We need to reposition UI attached to the content then.

E.g. Image element is rendered in the DOM after pressing Start external changes but image is heavy and we need to wait a couple of seconds to see the source of the image. The image is loaded but UI is in the old position because its its update was not triggered:
sep-25-2017 11-40-19

@oleq
Copy link
Member

oleq commented Sep 25, 2017

It looks more like a bug in ckeditor5-link. Since there's no selection enclosing the image after the external insertion, the link balloon should simply hide and no image UI should show up.

The sample does not show what happened to the selection after the insertion, though. If it's still in the link, the link balloon should simply be re-positioned.

@oskarwrobel
Copy link
Contributor Author

oskarwrobel commented Sep 25, 2017

Link is still in the document and selection is in the link element.

@oskarwrobel
Copy link
Contributor Author

Gif has been replaced.

@oskarwrobel
Copy link
Contributor Author

We need to get image from DOM, listen to its load event and call viewDoc.render() or just fire viewDoc#render event. Question is when we should start to listen to this event. During model -> view conversion?

@oleq
Copy link
Member

oleq commented Sep 25, 2017

cc @szymonkups

oskarwrobel referenced this issue in ckeditor/ckeditor5-image Sep 25, 2017
@oskarwrobel
Copy link
Contributor Author

oskarwrobel commented Sep 25, 2017

@oskarwrobel oskarwrobel self-assigned this May 22, 2018
oskarwrobel referenced this issue in ckeditor/ckeditor5-image Jun 18, 2018
oskarwrobel referenced this issue in ckeditor/ckeditor5-image Jun 19, 2018
oskarwrobel referenced this issue in ckeditor/ckeditor5-image Jun 26, 2018
oskarwrobel referenced this issue in ckeditor/ckeditor5-image Jun 26, 2018
oskarwrobel referenced this issue in ckeditor/ckeditor5-image Jun 26, 2018
oskarwrobel referenced this issue in ckeditor/ckeditor5-image Jun 26, 2018
oskarwrobel referenced this issue in ckeditor/ckeditor5-image Jun 26, 2018
oskarwrobel referenced this issue in ckeditor/ckeditor5-image Jun 26, 2018
oskarwrobel referenced this issue in ckeditor/ckeditor5-image Jun 26, 2018
oleq referenced this issue in ckeditor/ckeditor5-image Jun 29, 2018
Fix: The UI should update once the image is loaded. Closes #142. 

Used the `EditorUI#update` event instead of `View#render` to attach the UI components (see ckeditor/ckeditor5-core#130).
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-image Oct 9, 2019
@mlewand mlewand added this to the iteration 19 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:image labels Oct 9, 2019
@Isaacn123
Copy link

Isaacn123 commented Jun 6, 2020

am getting this empty Tags
<figure class="image"><img></figure>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:image type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
4 participants