Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

input element with email type #2443

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

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".

Owner

arian commented Oct 31, 2012

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

Owner

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 added a commit to arian/mootools-core that referenced this issue Dec 21, 2012

Owner

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 added a commit to arian/mootools-core that referenced this issue Feb 11, 2013

arian added a commit to arian/mootools-core that referenced this issue Feb 11, 2013

Owner

ibolmo commented Mar 3, 2014

Moving to the PR.

@ibolmo ibolmo closed this Mar 3, 2014

SergioCrisostomo added a commit to SergioCrisostomo/mootools-core that referenced this issue Jun 1, 2014

SergioCrisostomo added a commit to SergioCrisostomo/mootools-core that referenced this issue Jun 1, 2014

SergioCrisostomo added a commit that referenced this issue Jun 2, 2014

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment