On Wed, Aug 27, 2014 at 2:52 PM, Colin Alworth niloc...@gmail.com wrote:
As I'm sure everyone is aware, IE11 is making the navigator.useragent
property significantly more useless than it already was, by having IE11
identify as 'Trident' rather than 'MSIE', and adding 'iPhone', 'Webkit',
'Android' and a few other obviously garbage strings.
Check out
http://msdn.microsoft.com/en-us/library/ie/hh869301%28v=vs.85%29.aspx -
its hard to believe, but its all spelled out easily, so that you can
identify which device you might be running on by deciphering this simple
table. /s.
By following a link at the bottom of the page to a document entitled
Detecting Internet Explorer More Effectively at
http://msdn.microsoft.com/en-us/library/ie/ms537509%28v=vs.85%29.aspx,
anything newer IE8 considered 'recent'. This document is also marked as no
longer being maintained, so I'm curious as to why it was linked from the
above article. Other links are broken too (try clicking on
'navigator.userAgent'), so I'm not sure if this is actually meant to be
satire, or some kind of meta-joke about how hard it is to correctly develop
for IE. In any case...
IE 11 is worlds better than earlier browsers (8, 9 still is at 27%
worldwide, 34% in North America according to theie8countdown.com and
theie9countdown.com), but it is still all kinds of crazy. Examples we've
run into recently:
Scrollwheel events in gecko are wired up to use event.detail to find out
how far the user scrolled. Since IE11 looks like Gecko (on the desktop...),
you incorrectly get that instead of the code in DOMImplTrident or
DOMImplStandardBase which uses (Math.round(-evt.wheelDelta / 40) || 0)
instead. This is filed in GWT as
https://code.google.com/p/google-web-toolkit/issues/detail?id=8476
I'm curious if we still need those customization DOMImplTrident for
Firefox. Perhaps we just need to make it behave like the rest?
Focus. So many focus issues, but for the most part we limp along by making
everything else play IE's game. In one particular case, an element was
focused, hidden, and shown again, and for IE (which is to say user.agent =
ie8, ie9, ie10), we could make it work by rebinding to avoid letting
anything else be focused, since other browsers were behaving as expected.
Alas, IE11 thinks it's other browsers, so the only way to make it work is
to do a silly runtime check...
...Or, add a permutation for IE11.
In the past we've explored extend-property'ing the user.agent values, but
this either makes it impossible to cleanup get along with newer GWT
versions, or breaks CssResource code that misses a rule or two here and
there, or causes excessive logspam from the fallback property. Instead, in
GXT we ended up adding our own user.agent-like property, and then using
conditional properties and soft permutations to map back to user.agent
without causing extra permutations unless the developer wants them (see
http://code.google.com/p/google-web-toolkit/wiki/ConditionalProperties
and http://code.google.com/p/google-web-toolkit/wiki/SoftPermutations if
you haven't already). In the past, this worked great for us to split out
ie6/7 for our own rules, and continues to work beautifully for telling the
difference between Safari and Chrome and Opera, which all show up as
'safari' in GWT.
This won't work for IE11, for a few reasons:
a) IE11 sometimes shows up as 'safari', and sometimes as 'gecko1_8', so
conditional properties will get a bit hairy(er) than usual.
b) At some point, we've been expecting that the level of frustration with
IE11 in the general community would be high enough to warrant a new value
or slapping it on to an existing one, adding either 'ie10' or 'ie11' to the
list above.
So, while this has gotten much longer than I had planned, I hope I've made
a case for this. I'd like to propose in GWT 2.7 (and will write up the
patch) that we add a 'ie11' value to user.agent, and detect it by checking
for the presence of rv:11 and trident in the useragent string. I would be
okay with forcing this to map to gecko1_8 in any IE-specific rebind rule
and revisit at a later date (since that is what we are effectively doing
today). Except of course for DOMImplMozilla, which is clearly broken with
IE11.
Thoughts? Additional snark? Other IE11 bugs that will magically be fixed
when this is complete?
I'm not totally against adding IE11; I think the way forward to deal with
permutation mess is soft-permutations which means it is not so bad to have
IE11.
On the other hand keeping IE11 together with FF helps us to unify the
implementation for modern browsers instead of diverging. So fixing these
issues are actually a good step in that direction.
--
You received this message because you are subscribed to the Google Groups
GWT Contributors group.
To unsubscribe from this group and stop receiving emails from it, send an
email to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view