There are some new key-trap ApIs that can handle that, IIRC FF don't handle that part as well as Chrome.