elidupuis/jquery-modal — comment on commit d83677cd4fc15f24f9e83f77c024709ef2c71ebd
File:  line 0
By elidupuis:

This fixes a bug that allowed a modal to be closed with the `esc` button even when the `escapeClose` option is set to false. This was possible when a modal instance was opened with `escapeClose` set to true, before a separate modal was opened with `escapeClose` set to false. The `keydown` listener was still active from the first instance.

This fix simply unbinds the keydown listener when the modal is closed.