Closed
Bug 617891
Opened 15 years ago
Closed 15 years ago
when insert a mathml element into DOM it is not rendered properly
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
INVALID
People
(Reporter: olunet, Unassigned)
Details
(Keywords: html5)
Attachments
(4 files)
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.10 Safari/534.13
Build Identifier: 4.0b8pre
One would like to change mathml code with javascript. The simplest case: insert a fragment into existing DOM, inside <math>. Let the fragment be <mqsrt><mn>2</mn></msqrt>
1. The element is properly inserted, but it is not rendered by Firefox 4. One won't see square radical over 2.
2. In order to get a desired result the whole equation have to be rebuild (reloaded). In this case script make a copy of the equation and replace it by the copy.
3. There is no such problem in the latest Webkit. Example just works.
4. Css styles may be applied to the inserted element. That is the reason, why the example works in Opera.
Reproducible: Always
Steps to Reproduce:
In the example attached
1. select an element
2. apply script pressing a button "insert radical"
3. try button "insert radical with reload"
4. reload the page and try button "insert radical", than "apply css styles"
Actual Results:
a fragment is inserted, but is rendered as a simple text-node
Expected Results:
a fragment should be rendered properly according to mathml-specification without reloading
Tested in Firefox 4(different versions) under mac, linux and windows.
This bug should be fixed until the release of Firefox 4. The bug prevents the development of mathml js-editor.
in order to play with attachments, particularly with css styling, I would recommend to download them.
Here is a working example, that struggles because of the bug:
http://ats.cs.ut.ee/tvp2010/php/eqed1/rel3/
Due to the fact, that equation should be reloaded every time it is changed, CPU load is enormous.
Updated•15 years ago
|
Product: Firefox → Core
QA Contact: general → general
Comment 7•15 years ago
|
||
This is a jquery bug. Whatever it does for |$("<msqrt>")| produces an element in the HTML namespace, not the MathML one. Which means, in particular, that it's not using the browser's actual parser to parse that string; it's parsing it itself, and incorrectly.
I recommend using standard DOM calls to create MathML elements; then things will work correctly.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Boris is right. Even in with html5 doctype, math elements should have proper namespace.
However, wouldn't it be right to make mathml and svg elements work with html-namespace?
Comment 10•15 years ago
|
||
> However, wouldn't it be right to make mathml and svg elements work with
> html-namespace?
No, not really. Especially in the case of SVG, which has some name overlaps with HTML.
You need to log in
before you can comment on or make changes to this bug.
Description
•