new version

Fix behavior on tab keypress in mask mode