Ticket #11901 (closed bug: invalid)
JQuery opacity test is not exhaustive according to spec
|Reported by:||gary-1111||Owned by:||gary-1111|
On line 1417 of version 1.7.2 of JQuery there is a check to ensure that the browser is able to retrieve an opacity value set in some test HTML on line 1379.
The test HTML sets an opacity value of ".55" on a link element and the check tests "0.55" is returned when queried by JS.
The specification for "integers and real numbers" in CSS 2.1 "syntax and basic data types" (available here) states that:
A <number> can either be an <integer>, or it can be zero or more digits followed by a dot (.) followed by one or more digits.
As such it is perfectly valid for a browser to return ".55" in response to the check on line 1417. Currently if it does, the check fails and JQuery assumes the browser to be IE and "patches" all calls to set/get opacity. This causes a problem with the HTMLUnit browser (which does return ".55") as the patched set/get opacity logic attempts to invoke functions which are IE specific and causes an exception.
I understand that HTMLUnit is not a supported browser for the JQuery project but in terms of compatibility I think it would be better if the opacity check were updated to test according to spec.
- Owner set to gary-1111
- Status changed from new to pending