Hi,
I have some css
Which is working fine in FF as I fill the form in, I get my green ticks as desired.
As you populate a field, it seems FF re-validates the form and applies the valid pseudo class when you exit the field.. all is good .
However, in IE if I enter valid input and leave the field the form isn't revalidated and the invalid pseudo class is still showing a red cross.
So I added some on-blur events...
However, even though this event is firing when I exit the input field, still the incorrect pseudo classes aren't being applied in IE.
If I just click on any blank part of the page, outside of another input field, then the correct pseudo class 'content' shows.
Why can't I get IE to correctly re-apply the pseudo classes and update the screen using .checkValidity() ?
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
I have some css
Code:
:required:valid + span.tickcross::after { content: '\f058'; }
:required:invalid + span.tickcross::after { content: '\f057'; }
:required:valid + span.tickcross {color:green;}
:required:invalid + span.tickcross {color:red;}
Which is working fine in FF as I fill the form in, I get my green ticks as desired.
As you populate a field, it seems FF re-validates the form and applies the valid pseudo class when you exit the field.. all is good .
However, in IE if I enter valid input and leave the field the form isn't revalidated and the invalid pseudo class is still showing a red cross.
So I added some on-blur events...
Code:
// ensure form is revalidated when field is exited
$('[required]').on('blur',function(){ $('form')[0].checkValidity();});
However, even though this event is firing when I exit the input field, still the incorrect pseudo classes aren't being applied in IE.
If I just click on any blank part of the page, outside of another input field, then the correct pseudo class 'content' shows.
Why can't I get IE to correctly re-apply the pseudo classes and update the screen using .checkValidity() ?
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music