input element with email type #2443

Closed
ghost opened this Issue Oct 31, 2012 · 5 comments

Projects

None yet

2 participants

@ghost
ghost commented Oct 31, 2012

Hi!

i can't create a new input element with type: 'email'. The console returns "script87 invalid argument".

@arian
Member
arian commented Oct 31, 2012

can you post an example on http://jsfiddle.net?

@arian
Member
arian commented Oct 31, 2012

Also, which browser, which MooTools version...

@ghost
ghost commented Nov 1, 2012

Hi,

my browser is IE9 on Windows7Pro, no problem on chrome. I think is because IE doesn't support email type, but IMO neither IE should throw an error, should it? Can i post here the example? it's one line:

[code]
new Element('input', {type: 'email'});
[/code]

@arian arian added a commit to arian/mootools-core that referenced this issue Dec 21, 2012
@arian arian Adding tests for #2443 81682ef
@arian
Member
arian commented Dec 21, 2012

I think we could add something like:

var input = document.createElement('input');
var support = false;
try {
    input.type = 'x';
    support = input.type == 'x';
} catch (e){}

if (!support) propertySetter.type = function(value){
    try {
        this.type = value;
    } catch (e){
        this.type = 'text';
    }
}
@arian arian added a commit to arian/mootools-core that referenced this issue Feb 11, 2013
@arian arian Adding tests for #2443 fd09665
@arian arian added a commit to arian/mootools-core that referenced this issue Feb 11, 2013
@arian arian Fixes #2443 - Fix IE9 which trowed an error when setting an input typ…
…e to "email"
6345dee
@ibolmo
Member
ibolmo commented Mar 3, 2014

Moving to the PR.

@ibolmo ibolmo closed this Mar 3, 2014
@SergioCrisostomo SergioCrisostomo added a commit to SergioCrisostomo/mootools-core that referenced this issue Jun 1, 2014
@arian arian Adding tests for #2443 136258c
@SergioCrisostomo SergioCrisostomo added a commit to SergioCrisostomo/mootools-core that referenced this issue Jun 1, 2014
@arian arian Fixes #2443 - Fix IE9 which trowed an error when setting an input typ…
…e to "email"
6bc2c41
@SergioCrisostomo SergioCrisostomo added a commit that referenced this issue Jun 2, 2014
@SergioCrisostomo SergioCrisostomo Merge: Fix IE9 which trowed an error when setting an input type to "e…
…mail"

Closes #2471, fixes #2443

Fix IE9 which trowed an error when setting an input type to "email"
Adding tests for #2443
d16b5b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment