0

I am using AngularJs and triggering validation on blur. The field is prefocused when the page loads, and when I click on other clickable elements apart from the submit button (such as links to other pages), validation is triggered (obviously, as clicking on other elements means blurring the field).

I would like to avoid this validation from being triggered depending on which elements has been clicked. I have managed to do this with a directive added to those elements I don't want to trigger validation (links). The directive simply does e.prevendDefault(). This works perfectly for major browsers, but not for IE8, which unfortunately I need to support.

There are no errors in the IE8 console.

I would appreciate any ideas, and apologies if my question doesn't meet standards (it's my first question!).

Thanks,

MartaGalve
  • 1,056
  • 3
  • 13
  • 34
  • Have you tried this http://stackoverflow.com/a/1000606/1632286 – squiroid Mar 27 '15 at 09:44
  • i am not sure if i understand well, but i suggest to create a directive for each element that trigger the form validation and not that prevent the validation. If this make any sense ;-) – Raulucco Mar 27 '15 at 09:53
  • @squiroid I have yes, it doesn't seem to be the problem, IE is not throwing an error on this line, it is not complaining about event not having a method preventDefault, it simply does nothing. – MartaGalve Mar 27 '15 at 11:39

0 Answers0