User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:126.96.36.199) Gecko/20100409 Gentoo Firefox/3.6.3
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:188.8.131.52) Gecko/20100409 Gentoo Firefox/3.6.3
I use XLinks in order to link Presentation MathML symbols to their definitions in OpenMath Content Dictionaries. I will attach a sample document. Normal operators can easily linked using e.g. <mo xlink:href="http://www.openmath.org/cd/arith1#plus>+</mo>. But for mfrac this does not work. When I add an XLink to it, it links the mfrac, but not _just_ the mfrac, but also all of its children. So there is no possibility of making operators that occur inside the fraction link somewhere else.
The behavior that the parent always wins when there are nested links may sound reasonable, and it may be against best practices to nest links at all, but when I want to link mfrac to http://www.openmath.org/cd/arith1#divide but operators inside the mfrac to some other target, I am forced to nest links, because there is no <mo>-like symbol for mfrac.
So what I would like to suggest is that an xlink:href on mfrac only affects the fraction stroke, not the whole fraction expression including all children.
This might be a general challenge for MathML; therefore I will also discuss this issue on W3C's MathML list.
Steps to Reproduce:
1. Open the attached document.
2. Middle-click (assuming Linux) the "plus" in a+b.
Leads to "divide"
Should lead to "plus" (as the XLink on the other + operator does)
Here I report this for XLink, but as soon as bug 534968 will be addressed, the same problem may hold for @href.
Created attachment 438750 [details]
Test case: mfrac with an XLink and children that link somewhere else
Here is the related discussion on the MathML list: http://lists.w3.org/Archives/Public/www-math/2010Apr/thread.html#msg13
I don't think your proposal will work in general (for example the bar of mfrac can have linethickness=0). Also, I think it would be difficult to implement in Mozilla: the bar is not a real C++ object, it only "lives" when we draw it so we can really catch event from it. What you would need is maybe a UI that proposes all the possible links of the MathML elements you click on.
Your test case works for me. Probably bug 427990 fixes the issue.
Can you please try with Aurora:
It seems to me that now the child element always wins.
Christoph, do you still have the issue?
Thanks, Fréd, with Firefox 10 I am now able to click on the linked fraction stroke. Not always though. In my test case in comment 1 above you still have to take care not to accidentally select the "plus" in the numerator. If you select the link without traversing it (e.g. by hitting TAB several times) you will see that it is much larger than the plus sign; it even extends below the fraction stroke. But on the other hand a smaller link would make the plus sign hard to focus, so altogether I think the current solution is sufficient.