https://bugzilla.wikimedia.org/show_bug.cgi?id=33596
Web browser: ---
Bug #: 33596
Summary: inArray's use of strict equals in es.ContentView.js
may be inappropriate (FIX attached)
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: VisualEditor
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
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:
1) Create an inline equation
2) Click a different section of the text
3) Click in the middle of the inline equation
4) 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
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l