Author: acocaracha
Description:
I've noticed a problem with es.ContentView.js when implementing tex equation support. When you click text outside an annotation and then click back into the annotation, the new content is determined to have a different type than the surrounding text. I believe this is because inArray uses strict equals and really the only thing it should be comparing is the type key and I don't think that necessarily needs to be strict (although I guess it could be).
Here is a copy of the old code: https://jalto.net/equationdb/VisualEditor_save/demo/
And the new code: https://jalto.net/equationdb/VisualEditor_old/demo/
Steps to reproduce in old code:
- Create an inline equation
- Click a different section of the text
- Click in the middle of the inline equation
- Type something
The new code is working fine. The commits are:
https://github.com/jalto/VisualEditor/commit/5e544447e5d54b260f5c0333f4dc9da5f15124d7
and
https://github.com/jalto/VisualEditor/commit/0f5a139d24870f200070a95cd70539b04dc0ce33
Thanks,
John
Version: unspecified
Severity: normal