Side navigation
#8580 closed bug (wontfix)
Opened March 21, 2011 08:51PM UTC
Closed March 30, 2011 02:06PM UTC
Firefox versions return incorrect font-weight
Reported by: | hannasm | Owned by: | hannasm |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | css | Version: | 1.5 |
Keywords: | font-weight,firefox | Cc: | |
Blocked by: | Blocking: |
Description
https://bugzilla.mozilla.org/show_bug.cgi?id=77882
I stumbled upon this while trying to measure text with the canvas object.
A <strong> tag defaults font-weight:bolder which in firefox returns 401. Impact is that anything that needs an accurate font-weight (such as configuring canvas for measuring/rendering text) will fail.
<script src="jquery-1.5.min.js" language="javascript" type="text/javascript"></script> <strong id="myStrong"> test test </strong> <script type="text/javascript"> alert($('#myStrong').css('font-weight')); // 401 </script>
This has been tested in firefox 3.6.10 but, from what i've gathered, affects many more versions of firefox both forward and backward.
I admit this is a bug in firefox but for compatibility jquery should probably know how to handle this scenario and give something closer to the real font-weight.
Attachments (0)
Change History (4)
Changed March 21, 2011 08:58PM UTC by comment:1
Changed March 24, 2011 09:46PM UTC by comment:2
owner: | → hannasm |
---|---|
status: | new → pending |
So is 401 not an accurate value? If not, I agree that this sounds more like something Firefox needs to fix. Have you reported it via Bugzilla? The closest thing I found was this:
Changed March 25, 2011 12:20AM UTC by comment:3
First line of the op has another of the relevant firefox bug reports. It was reported in 2001 so affects *many* versions of the browser. I am just suggesting jquery implement a workaround.
Changed March 30, 2011 02:06PM UTC by comment:4
_comment0: | Thanks for submitting your bug report. We've discussed this with other members of the bug triage team and we feel that this is an issue Mozilla/Firefox need to fix on their end. Although there are occasions where it makes sense for jQuery core to implement workarounds to enable expected or consistent behavior, we believe that this isn't one of those. Thanks for bringing this to our attention, nevertheless :) → 1301497108078811 |
---|---|
component: | unfiled → css |
keywords: | → font-weight,firefox |
priority: | undecided → low |
resolution: | → wontfix |
status: | pending → closed |
Thanks for submitting your bug report. We've discussed this with other members of the bug triage team and we feel that this is an issue Mozilla/Firefox need to fix on their end as the behavior for it is undefined. If you do need to workaround, normalization should be possible using cssHooks.
Although there are occasions where it makes sense for jQuery core to implement workarounds to enable expected or consistent behavior, we believe that the above ticket isn't one of those.
Thanks for bringing this to our attention, nevertheless :)
here's a fiddle for convenience
http://jsfiddle.net/H9znQ/1/