-
Notifications
You must be signed in to change notification settings - Fork 27.5k
input type=email doesn't work in IE9 #4546
Comments
This may be another However to my knowledge, IE does not support I've tried to solve this for webkit/blink edit: I guess if |
In IE10 the validation seems to work fine. Shall I just serialise the input element to json and paste it here? Sent from my mobile phone On 21 Oct 2013, at 00:52, Caitlin Potter notifications@github.com wrote:
|
It might be helpful, and I do not have access to IE10 to test myself. |
Page: __Browser: __ el = document.querySelectorAll('input[ng-model=text]')[0] ng-1382474647010=679 setSelectionRange= createTextRange= currentStyle=[object MSCurrentStyleCSSProperties] click= focus= getElementsByClassName= insertAdjacentHTML= scrollIntoView= componentFromPoint= doScroll= attachEvent= detachEvent= addBehavior= addFilter= applyElement= clearAttributes= contains= dragDrop= getAdjacentText= insertAdjacentElement= insertAdjacentText= mergeAttributes= releaseCapture= removeBehavior= removeFilter= replaceAdjacentText= setActive= setCapture= createControlRange= removeNode= replaceNode= swapNode= clientHeight=26 getAttributeNS= getAttributeNode= getAttributeNodeNS= getBoundingClientRect= getClientRects= getElementsByTagName= getElementsByTagNameNS= hasAttribute= hasAttributeNS= removeAttribute= removeAttributeNS= removeAttributeNode= setAttribute= setAttributeNS= setAttributeNode= setAttributeNodeNS= fireEvent= msMatchesSelector= querySelector= querySelectorAll= attributes=[object NamedNodeMap] dispatchEvent= removeEventListener= appendChild= cloneNode= compareDocumentPosition= hasAttributes= hasChildNodes= insertBefore= isDefaultNamespace= isEqualNode= isSameNode= isSupported= lookupNamespaceURI= lookupPrefix= normalize= removeChild= replaceChild= ATTRIBUTE_NODE=2 Required validation works fine. |
Browsers (at least every browser that I am aware of) internally turns it into I'm not seeing validity in your stuff at all, which is curious because IE10 claims to support it (http://msdn.microsoft.com/en-us/library/ie/hh773263(v=vs.85).aspx). The angular docs are using Alternatively, if you're using ChromeFrame, then this could be a different issue (but that wouldn't explain why the ValidityState isn't visible) |
The browser I'm using is IE 10 however in developer tools I'm changing Browser Mode to IE9 and Document Mode to IE9. I believe that makes the browser to behave like IE9. I don't have the access to original IE9, This link (http://msdn.microsoft.com/en-us/library/ie/hh773263(v=vs.85).aspx) doesn't explicitly mention IE9 therefore I'm not sure whether it's safe to assume anything about IE9. |
Yes, IE9 does not include ValidityState. It may still return the empty string in the case of invalid email inputs without exposing the ValidityState. http://www.quirksmode.org/html5/inputs.html states that IE9 does not support |
Thanks for your answer Caitlin. Does anyone else has IE browser and could On 22 October 2013 22:29, Caitlin Potter notifications@github.com wrote:
|
I confirmed this issue. IE 8 and 9 do not support type="email" thus it doesn't get picked up. We wrote a directive to handle this action. Here's the code that would go inside the linking function. Don't forget to require
|
doesn't angular.js/src/ng/directive/input.js Line 619 in b6d5439
Maybe I'm confused but I'm not seeing what your custom directive does that that doesn't |
@caitp Doh! Totally forgot about that. Use that! |
I'm using Internet Explorer 11 (version 11.0.9600.16476) with developer tools IE 9 emulation (Document mode 9, User agent string Internet Explorer 9). Url is http://code.angularjs.org/1.2.5/docs/#!/api/ng.directive:input.email When I enter the string '123' into email box I get: This is clearly wrong. |
@caitp I've run http://plnkr.co/edit/vV1TnRe7XHBfzpPnzT9U?p=preview on Internet Explorer 11 (version 11.0.9600.16476) with following results :
In Chrome I'm getting this: |
the IE9 error you're getting seems to be an issue with plnkr itself, since that test is not an angular app :p that's unfortunate. You could try shoving it into a jsfiddle and see how it works there, but I wouldn't be too worried about it, since my initial theory that it was browser constraints validation causing the issue appears to be false. Anyways, to my knowledge there's nothing in the emailInputType function which cares what browser you're using. It tests if the value is not empty, and matches the email regexp. So short of that, it shouldn't be marked as valid. If you can investigate this (I would myself, but I don't have a windows machine to test with), perhaps you can turn up a reason why. |
@caitp I saved the html from your plnkr as local html file. Here is the bevaviour I get with Internet Explorer 11 (version 11.0.9600.16476):
So if the browser version is below 10 I get no empty object. |
It just means they don't have the ValidityState stuff, it's no big deal, the issue is unrelated to any of that. It was a mistaken hunch as I said already ;) To my knowledge, there's no reason why emailInputType should fail to work with IE9 emulation, but I guess anythings possible. If you can spot why, send a patch to fix it! But, again, emulated browsers are not really supported even by MS. |
can someone please confirm that the issue is present only for emulated IE9 and not for real IE9? |
Yes, I just checked in a real IE9, and it seems to work just fine. Emulated IE9 from IE10 does not validate at all for me... |
with #4546 (comment), I think there is nothing else to talk about. If someone has this issue with a real IE9, please post here |
Hi, I'm trying to get my app to work for IE9.
I'm actually using IE10 with Browser Mode set to IE9 and Document Mode set to IE9 standards.
On the input [email] docs page (http://docs.angularjs.org/api/ng.directive:input.email) in version v1.2.0-08f376f it seems like email validation does not work in IE9:
Notice how the value of the textbox is '123' and myForm.$error.email = false
Is this a bug? Do you plan to fix it?
Thanks
The text was updated successfully, but these errors were encountered: