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

Fixes #1692
Closes #2087