Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

IE8 mailto shows up in anchor text #1949

Closed
jgallen23 opened this issue Feb 4, 2013 · 3 comments
Closed

IE8 mailto shows up in anchor text #1949

jgallen23 opened this issue Feb 4, 2013 · 3 comments

Comments

@jgallen23
Copy link

For some reason when you use the same variable (in this case email) when doing a mailto the entire link shows up in the anchor text. Works fine in all other browsers.

http://jsfiddle.net/mt4e5/4/

Screen Shot 2013-02-04 at 10 50 43 AM

@IgorMinar
Copy link
Contributor

that's weird..

Screen Shot 2013-02-04 at 12 30 36 PM

somehow the anchor text is reset to mailto:... does anybody in the community want to debug this?

@jgallen23
Copy link
Author

A workaround is to wrap the anchor text in a span tag
http://jsfiddle.net/mt4e5/7/

gonzaloruizdevilla added a commit to gonzaloruizdevilla/angular.js that referenced this issue Feb 11, 2013
…o value

fixes angular#1949
IE bug: http://webbugtrack.blogspot.com.es/2008/07/bug-140-changing-mailto-links-error-in.html
Only happens when:
1. content has an @ but not ends with it. Regexp: /.*\S.*@.+/
2. href new value is like a URI or email (more or less) Regexp: /^((ftp|https?):\/\/|mailto:|.*@.+)/

To prevent IE from replacing the text content, the text nodes must be detached
before setting the href value and reattached afterwards.

Signed-off-by: Gonzalo Ruiz de Villa <gonzaloruizdevilla@gmail.com>
IgorMinar added a commit to IgorMinar/angular.js that referenced this issue Feb 15, 2013
Apparently there is a really weird bug in IE6-8 that causes anchor textContent
to be reset with href content when both contain @ symbol.

Inserting a bogus comment node into all anchor elements in IE works around this
browser bug.

I'm fixing the issue via directive because that way we'll fix it for jQuery as
well.

I fixed an e2e test too because it was incorrect.

Closes angular#1949
IgorMinar added a commit that referenced this issue Feb 15, 2013
Apparently there is a really weird bug in IE6-8 that causes anchor textContent
to be reset with href content when both contain @ symbol.

Inserting a bogus comment node into all anchor elements in IE works around this
browser bug.

I'm fixing the issue via directive because that way we'll fix it for jQuery as
well.

I fixed an e2e test too because it was incorrect.

Closes #1949
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants