Handle constrainTabKey only on tab keydown event

Since the event handler is called for both keydown and keyup it has the affect that you cannot focus the last field on the modal form. Imagine the case you have 2 text fields, user focused on first field and hits tab key.  You get a keydown on the tab key in the first field (all is good it allows to progress to the next field), but then we get that tab key's keyup event in the second (and last) field. Since it is the last field it thinks the user is trying to tab into the blocked document behind and constrains it and forces focus back to first input field.