fix(modal): prevent default event when closing via escape key

Fixes #1692