css_browser_selector icon indicating copy to clipboard operation
css_browser_selector copied to clipboard

Hi using IE 11.0.9 and its showing Red (win 7 64bit)

Open mikefurr opened this issue 10 years ago • 11 comments

your page say should be Yellow ?

mikefurr avatar Jul 04 '14 12:07 mikefurr

Me to ... the same issue on two different PCs. If you are running windoz and ie, it adds .gecko to the html tag, not .ie

jl2035 avatar Jul 20 '14 15:07 jl2035

Damn. it's this shit: http://www.nczonline.net/blog/2013/07/02/internet-explorer-11-dont-call-me-ie

jl2035 avatar Jul 20 '14 15:07 jl2035

I've been detecting IE11 using this conditional (jQuery, but could be converted to raw JS):

if ( Object.hasOwnProperty.call(window, "ActiveXObject") && !window.ActiveXObject ) {
    jQuery('html').addClass('ie ie11');
}

chrisblakley avatar Jul 23 '14 14:07 chrisblakley

I fixed it by detecting the Trident token. Forked the repo here: https://github.com/jl2035/css_browser_selector

I will try to add a special ie 11 detection, distinguishable from other ie versions.

jl2035 avatar Jul 24 '14 16:07 jl2035

@jl2035 On line 111, update your repo to:

(is('windows nt 6.3')?' win8.1'
:is('windows nt 6.2')?' win8'

Should give you the matching set.

isarmstrong avatar Dec 03 '14 18:12 isarmstrong

Actually, you'll want all of this:

(!(/opera|webtv/i.test(ua))&&/msie\s(\d+)/.test(ua))?('ie ie'+(/trident\/7\.0/.test(ua) ? '11' : RegExp.$1))
            :is (!(/opera|webtv/i.test(ua))&&/msie\s(\d+)/.test(ua))?('ie ie'+(/trident\/6\.0/.test(ua) ? '10' : RegExp.$1))
            :is (!(/opera|webtv/i.test(ua))&&/msie\s(\d+)/.test(ua))?('ie ie'+(/trident\/5\.0/.test(ua) ? '9' : RegExp.$1))
            :is (!(/opera|webtv/i.test(ua))&&/msie\s(\d+)/.test(ua))?('ie ie'+(/trident\/4\.0/.test(ua) ? '8' : RegExp.$1))

~~Although my script still tags IE6 as both 6 and 7.... debugging~~

All good actually, was an unrelated mistake.

isarmstrong avatar Dec 03 '14 20:12 isarmstrong

Updated. Thanks.

It's been a while.. is my repo still relevant?

jl2035 avatar Dec 03 '14 21:12 jl2035

In a Modernizr era, people are obviously encouraged to use feature detection. I can see how that would make the repo seem irrelevant.

I updated it because my client has a product which, put simply, they don't intend to ever fix for IE. It happens to work on IE11 though. The marketing team wanted a way to politely disable the submission form and ask IE 5-10 users to download an alternate browser. A standard IE conditional comment seemed messy compared with .ie11 .selector {display: inherit}, or the ability to disable a field via jQuery based on .hasClass.

So the entire script isn't something I use very often - but in special circumstances, it beats writing up my own regex test.

It can also be useful for resolving typography differences between Firefox/IE and Webkit on Windows when the grid is highly specific.

On Wed, Dec 3, 2014 at 1:58 PM, p2035e [email protected] wrote:

Updated. Thanks.

It's been a while.. is my repo still relevant?

— Reply to this email directly or view it on GitHub.

isarmstrong avatar Dec 03 '14 22:12 isarmstrong

Whoops, I thought that was the OP. Neevermind. Feel free to merge the rest of my changes. https://github.com/isarmstrong/css_browser_selector

isarmstrong avatar Dec 03 '14 22:12 isarmstrong

Oh. But my repo was created just beacuse of ie11 issue. This is fixed in your repo by now, if I understand correctly. So yeah.. mine is irelevant, I think.

I guess I will just delete..

jl2035 avatar Dec 03 '14 23:12 jl2035

Yeah I added support for all missing IE versions, Win 8.1, and a new index.html that tests the user's browser + lists classes applied. It should really be merged in here.

Rafel is still around and very active on Github. I have to assume he is waiting for this project to die. Unfortunately, there are still times when detecting a browser is useful.

On Wed, Dec 3, 2014 at 3:40 PM, p2035e [email protected] wrote:

Oh. But my repo was created just beacuse of ie11 issue. This is fixed in your repo by now, if I understand correctly. So yeah.. mine is irelevant, I think.

I guess I will just delete..

— Reply to this email directly or view it on GitHub https://github.com/rafaelp/css_browser_selector/issues/30#issuecomment-65512938 .

isarmstrong avatar Dec 03 '14 23:12 isarmstrong