?
avatar fdesanto
fdesanto
12 Dec 2014

Steps to reproduce the issue

Build a form with Joomla Jform API and add email field with placeholder, if placeholder not is a email the field is not validate if empty.

Expected result

if field is empty and not required the validation of email field should be ok

Actual result

empty email field is not validated

System information (as much as possible)

Additional comments

This happen only on IE9

avatar fdesanto fdesanto - open - 12 Dec 2014
avatar brianteeman brianteeman - change - 3 Jan 2015
Labels Added: ?
avatar ggppdk
ggppdk - comment - 31 Jan 2015

In IE8 and IE9
form.elements also contains function names
(code is supposed to take care of this ?? but it does not)

After calling (exists in 2 places inside the file)
var self = elem.form.H5Form;

We need to test if "self" is an object aka a form element, and do this:
if (typeof self != 'object') return true;

The return true is needed so that function
validateField(...)
will work properly

Tested fix, i will make a PR soon

avatar roland-d
roland-d - comment - 6 Mar 2015

Closing this issue because a fix has been proposed in #5935 Thanks everybody.

avatar roland-d roland-d - change - 6 Mar 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-03-06 19:42:45
avatar roland-d roland-d - close - 6 Mar 2015

Add a Comment

Login with GitHub to post a comment