Ticket #672 (new defect)
FX.CSS.search - browser compatibility
| Reported by: | mattcoz | Owned by: | digitarald |
|---|---|---|---|
| Type: | defect | Priority: | minor |
| Milestone: | Mootools version 1.3 | Component: | Core |
| Keywords: | Fx CSS | Cc: |
Description
There are some issues with how the different browsers deal with the stylesheet rules objects. In the instance of a rule like this:
a:link
Most browsers will handle it correctly, but IE stores it as:
A:link
The easy solution is to change the regular expression check to case insensitive, but that wouldn't be standards compliant as class names are case sensitive. I guess we would have to find and change all tag names to upper case when IE is being used.
Another issue is rules like this:
a:link, a:hover
IE splits it up into separate entries, but other browsers keep it as one which causes the match to fail. This one is actually simple to fix, just change the regexp check to this:
'(^|, )' + selector + '(,|$)'
I've tested this in Firefox, Opera, Safari, and IE.
I'll get a patch put together that will deal with these two issues.