malsup / blockui

jQuery BlockUI Plugin
http://jquery.malsup.com/block/
1.69k stars 506 forks source link

Bug fix associated with constrainTabKey functionality #71

Closed jonesdhtx closed 11 years ago

jonesdhtx commented 11 years ago

Problem description: 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.

Fix: Handle constrainTabKey only on tab keydown event

malsup commented 11 years ago

Thank you!