learning-area
learning-area copied to clipboard
Update validation.js - fix firefox focus problem
returning false causes the browser to not open the link which fixes the problem need to update the documentation as well
Any context? What is the relevant documentation?
Any context? What is the relevant documentation?
in this article: https://developer.mozilla.org/en-US/docs/Learn/Accessibility/CSS_and_JavaScript
Note: The focus() part of this example is a bit tricky. Chrome and Edge (and newer versions of IE) will focus the element when the link is clicked, without needing the onclick/focus() block. Safari will only highlight the form element with the link on its own, so needs the onclick/focus() block to actually focus it. Firefox doesn't focus the inputs properly at all in this context, so Firefox users can't take advantage of this at present (although everything else works fine). The Firefox issue should be fixed soon — work is being done to give Firefox behaviour parity with other browsers (see bug 277178).
Thanks for looking at it