You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When model <caption> is empty, we remove <figcaption> element from view. But this causes a bug with undo:
When creating image, insert operation for caption is performed.
When undoing it, insert operation becomes remove operation for caption.
Remove operation has a range to remove, which is in <figure>.
However <figcaption> is not there, which throws an error (we are looking for a too big offset in <figure>).
It's easy to see that this is the problem, because you can undo the image insertion if you focus it.
Solutions:
There are two things we can do:
Introduce remove:caption converter which will check if the <figcaption> is there and consume change + stop event if it's not there.
Stop trying to fix all the issues that comes from the fact that we have element in model that sometimes is not in the view, and use CSS classes to hide it.
I am for 2.
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
Expected: Image is removed.
Actual: Editor throws an error.
Reason:
To put things short and simple:
When model
<caption>
is empty, we remove<figcaption>
element from view. But this causes a bug with undo:<figure>
.<figcaption>
is not there, which throws an error (we are looking for a too big offset in<figure>
).It's easy to see that this is the problem, because you can undo the image insertion if you focus it.
Solutions:
There are two things we can do:
remove:caption
converter which will check if the<figcaption>
is there and consume change + stop event if it's not there.I am for 2.
The text was updated successfully, but these errors were encountered: