Update modal.js

The problem described in https://github.com/twbs/bootstrap/issues/8703