Properly fix the esc-to-close issue.

See https://github.com/twbs/bootstrap/issues/4854